java/fileupload/src/main/java/com/formkiq/tutorials/fileupload/FormKiqClientBuilder.java
private static String loginToCognito(final String email, final String password) {

    InitiateAuthRequest req =
        InitiateAuthRequest.builder().clientId(CLIENT_ID).authFlow(AuthFlowType.USER_PASSWORD_AUTH)
            .authParameters(Map.of("USERNAME", email, "PASSWORD", password)).build();

    InitiateAuthResponse response = cognitoProvider.initiateAuth(req);
    return response.authenticationResult().idToken();
  }
/**
   * Logins into Cognito and returns a Authentication token that is valid for 1 HR.
   * 
   * @param email User's Email address
   * @param password User's Password
   * 
   * @return Cognito ID Token
   */
Logins into Cognito and returns a Authentication token that is valid for 1 HR.

@param email User's Email address
@param password User's Password

@return Cognito ID Token
Logins into Cognito and returns a Authentication token that is valid for 1 HR . @param email User ' s Email address @param password User ' s Password @return Cognito ID Token
private static String loginToCognito(final String email, final String password) {
    InitiateAuthRequest req =
        InitiateAuthRequest.builder().clientId(CLIENT_ID).authFlow(AuthFlowType.USER_PASSWORD_AUTH)
            .authParameters(Map.of("USERNAME", email, "PASSWORD", password)).build();
    InitiateAuthResponse response = cognitoProvider.initiateAuth(req);
    return response.authenticationResult().idToken();
  }
private static String loginToCognito ( final String email , final String password ) { InitiateAuthRequest req = InitiateAuthRequest . builder ( ) . clientId ( CLIENT_ID ) . authFlow ( AuthFlowType . USER_PASSWORD_AUTH ) . authParameters ( Map . of ( "USERNAME" , email , "PASSWORD" , password ) ) . build ( ) ; InitiateAuthResponse response = cognitoProvider . initiateAuth ( req ) ; return response . authenticationResult ( ) . idToken ( ) ; }
Logins into Cognito and returns a Authentication token that is valid for 1 HR.
Logins into Cognito and returns a Authentication token that is valid for 1 HR .