-
Notifications
You must be signed in to change notification settings - Fork 478
/
CognitoCreateAuthChallengeRequest.cs
47 lines (43 loc) · 2.37 KB
/
CognitoCreateAuthChallengeRequest.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace Amazon.Lambda.CognitoEvents
{
/// <summary>
/// https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-create-auth-challenge.html
/// </summary>
public class CognitoCreateAuthChallengeRequest : CognitoTriggerRequest
{
/// <summary>
/// One or more key-value pairs that you can provide as custom input to the Lambda function that you specify for the pre sign-up trigger. You can pass this data to your Lambda function by using the ClientMetadata parameter in the following API actions: AdminCreateUser, AdminRespondToAuthChallenge, ForgotPassword, and SignUp.
/// </summary>
[DataMember(Name = "clientMetadata")]
#if NETCOREAPP3_1_OR_GREATER
[System.Text.Json.Serialization.JsonPropertyName("clientMetadata")]
# endif
public Dictionary<string, string> ClientMetadata { get; set; } = new Dictionary<string, string>();
/// <summary>
/// The name of the new challenge.
/// </summary>
[DataMember(Name = "challengeName")]
#if NETCOREAPP3_1_OR_GREATER
[System.Text.Json.Serialization.JsonPropertyName("challengeName")]
#endif
public string ChallengeName { get; set; }
/// <summary>
/// an array of ChallengeResult elements
/// </summary>
[DataMember(Name = "session")]
#if NETCOREAPP3_1_OR_GREATER
[System.Text.Json.Serialization.JsonPropertyName("session")]
#endif
public List<ChallengeResultElement> Session { get; set; } = new List<ChallengeResultElement>();
/// <summary>
/// A Boolean that is populated when PreventUserExistenceErrors is set to ENABLED for your user pool client. A value of true means that the user id (user name, email address, etc.) did not match any existing users. When PreventUserExistenceErrors is set to ENABLED, the service will not report back to the app that the user does not exist. The recommended best practice is for your Lambda functions to maintain the same user experience including latency so the caller cannot detect different behavior when the user exists or doesn’t exist.
/// </summary>
[DataMember(Name = "userNotFound")]
#if NETCOREAPP3_1_OR_GREATER
[System.Text.Json.Serialization.JsonPropertyName("userNotFound")]
#endif
public bool UserNotFound { get; set; }
}
}