-
Notifications
You must be signed in to change notification settings - Fork 108
/
Test_that_Custom_Auth_signIn_invokes_proper_cognito_request_and_returns_custom_challenge.json
73 lines (73 loc) · 2.3 KB
/
Test_that_Custom_Auth_signIn_invokes_proper_cognito_request_and_returns_custom_challenge.json
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{
"description": "Test that Custom Auth signIn invokes proper cognito request and returns custom challenge",
"preConditions": {
"amplify-configuration": "authconfiguration.json",
"state": "SignedOut_Configured.json",
"mockedResponses": [
{
"type": "cognitoIdentityProvider",
"apiName": "initiateAuth",
"responseType": "success",
"response": {
"challengeName": "CUSTOM_CHALLENGE",
"challengeParameters": {
"SALT": "abc",
"SECRET_BLOCK": "secretBlock",
"SRP_B": "def",
"USERNAME": "username"
}
}
},
{
"type": "cognitoIdentityProvider",
"apiName": "respondToAuthChallenge",
"responseType": "success",
"response": {
"session": "someSession",
"challengeName": "CUSTOM_CHALLENGE",
"challengeParameters": {
"SALT": "abc",
"SECRET_BLOCK": "secretBlock",
"SRP_B": "def",
"USERNAME": "username"
}
}
}
]
},
"api": {
"name": "signIn",
"params": {
"username": "username",
"password": ""
},
"options": {
"signInOptions": {
"authFlow": "CUSTOM_AUTH_WITHOUT_SRP"
}
}
},
"validations": [
{
"type": "amplify",
"apiName": "signIn",
"responseType": "success",
"response": {
"isSignedIn": false,
"nextStep": {
"signInStep": "CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE",
"additionalInfo": {
"SALT": "abc",
"SECRET_BLOCK": "secretBlock",
"SRP_B": "def",
"USERNAME": "username"
}
}
}
},
{
"type": "state",
"expectedState": "CustomSignIn_SigningIn.json"
}
]
}