aws-sdk-net-extensions-cognito
aws-sdk-net-extensions-cognito copied to clipboard
Allow CognitoUser.RespondToCustomAuthAsync to include ClientMetadata
The current implementation of CognitoUser.RespondToCustomAuthAsync does not support setting the ClientMetadata property of the RespondToAuthChallengeRequest object, despite it being supported by the API.
This PR rectifies this by adding a ClientMetadata dictionary property to the RespondToCustomChallengeRequest dto, which is then used in building the RespondToAuthChallengeRequest object.
The new property added to the RespondToCustomChallengeRequest dto is using an object initialiser to ensure backwards compatibility. Without it, consumers upgrading to a version of this package containing this change will experience an ArgumentNullException when calling RespondToCustomAuthAsync as ClientMetadata will be set to new new Dictionary<string, string>(customRequest.ClientMetadata) with customRequest.ClientMetadata being null.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.