src/AWSSDK.Extensions.CognitoAuthentication/CognitoUserAuthentication.cs
/// <summary>
/// Initiates the asynchronous ADMIN_NO_SRP_AUTH authentication flow
/// </summary>
/// <param name="adminAuthRequest">InitiateAdminNoSrpAuthRequest object containing the necessary 
/// parameters to initiate the ADMIN_NO_SRP_AUTH authentication flow</param>
/// <returns>Returns the AuthFlowResponse object that can be used to respond to the next challenge, 
/// if one exists</returns>
Initiates the asynchronous ADMIN_NO_SRP_AUTH authentication flow
Initiates the asynchronous ADMIN_NO_SRP_AUTH authentication flow
public void StartWithAdminNoSrpAuthAsync(InitiateAdminNoSrpAuthRequest adminAuthRequest, AsyncCallback<AuthFlowResponse> callback = null)
        {
            AdminInitiateAuthRequest initiateAuthRequest = CreateAdminAuthRequest(adminAuthRequest);
            Provider.AdminInitiateAuthAsync(initiateAuthRequest, r =>
            {
                if (r.Exception != null)
                {
                    callback?.Invoke(new AsyncResult<AuthFlowResponse>(null, r.Exception));
                    return;
                }
                AdminInitiateAuthResponse initiateResponse = r.Response;
                UpdateSessionIfAuthenticationComplete(initiateResponse.ChallengeName, initiateResponse.AuthenticationResult);
                callback?.Invoke(new AsyncResult<AuthFlowResponse>(new AuthFlowResponse()
                {
                    SessionID = initiateResponse.Session,
                    ChallengeName = initiateResponse.ChallengeName,
                    AuthenticationResult = initiateResponse.AuthenticationResult,
                    ChallengeParameters = initiateResponse.ChallengeParameters,
                    ClientMetadata = new Dictionary<string, string>(initiateResponse.ResponseMetadata.Metadata)
                }, null));
            });
        }
public void StartWithAdminNoSrpAuthAsync ( InitiateAdminNoSrpAuthRequest adminAuthRequest , AsyncCallback < AuthFlowResponse > callback = null ) { AdminInitiateAuthRequest initiateAuthRequest = CreateAdminAuthRequest ( adminAuthRequest ) ; Provider . AdminInitiateAuthAsync ( initiateAuthRequest , r => { if ( r . Exception != null ) { callback ? . Invoke ( new AsyncResult < AuthFlowResponse > ( null , r . Exception ) ) ; return ; } AdminInitiateAuthResponse initiateResponse = r . Response ; UpdateSessionIfAuthenticationComplete ( initiateResponse . ChallengeName , initiateResponse . AuthenticationResult ) ; callback ? . Invoke ( new AsyncResult < AuthFlowResponse > ( new AuthFlowResponse ( ) { SessionID = initiateResponse . Session , ChallengeName = initiateResponse . ChallengeName , AuthenticationResult = initiateResponse . AuthenticationResult , ChallengeParameters = initiateResponse . ChallengeParameters , ClientMetadata = new Dictionary < string , string > ( initiateResponse . ResponseMetadata . Metadata ) } , null ) ) ; } ) ; }
Initiates the asynchronous ADMIN_NO_SRP_AUTH authentication flow
Initiates the asynchronous ADMIN_NO_SRP_AUTH authentication flow
Returns the AuthFlowResponse object that can be used to respond to the next challenge,
if one exists
Returns the AuthFlowResponse object that can be used to respond to the next challenge if one exists
adminAuthRequest
InitiateAdminNoSrpAuthRequest
InitiateAdminNoSrpAuthRequest object containing the necessary
parameters to initiate the ADMIN_NO_SRP_AUTH authentication flow
InitiateAdminNoSrpAuthRequest object containing the necessary parameters to initiate the ADMIN_NO_SRP_AUTH authentication flow
callback
AsyncCallback<AuthFlowResponse>