in src/Amazon.Extensions.CognitoAuthentication/CognitoUserAuthentication.cs [225:245]
public virtual async Task<AuthFlowResponse> RespondToCustomAuthAsync(RespondToCustomChallengeRequest customRequest)
{
RespondToAuthChallengeRequest request = new RespondToAuthChallengeRequest()
{
ChallengeName = ChallengeNameType.CUSTOM_CHALLENGE,
ClientId = ClientID,
ChallengeResponses = new Dictionary<string, string>(customRequest.ChallengeParameters),
Session = customRequest.SessionID
};
RespondToAuthChallengeResponse authResponse =
await Provider.RespondToAuthChallengeAsync(request).ConfigureAwait(false);
UpdateSessionIfAuthenticationComplete(authResponse.ChallengeName, authResponse.AuthenticationResult);
return new AuthFlowResponse(authResponse.Session,
authResponse.AuthenticationResult,
authResponse.ChallengeName,
authResponse.ChallengeParameters,
new Dictionary<string, string>(authResponse.ResponseMetadata.Metadata));
}