CognitoIdp fixes (#4518)
This commit is contained in:
parent
07913cfef0
commit
a4f58f0774
@ -1525,7 +1525,7 @@ class CognitoIdpBackend(BaseBackend):
|
||||
"ChallengeParameters": {
|
||||
"SALT": uuid.uuid4().hex,
|
||||
"SRP_B": uuid.uuid4().hex,
|
||||
"USERNAME": user.id,
|
||||
"USERNAME": user.username,
|
||||
"USER_ID_FOR_SRP": user.id,
|
||||
"SECRET_BLOCK": session,
|
||||
},
|
||||
|
@ -2561,6 +2561,7 @@ def user_authentication_flow(conn):
|
||||
|
||||
result["AuthenticationResult"]["IdToken"].should_not.be.none
|
||||
result["AuthenticationResult"]["AccessToken"].should_not.be.none
|
||||
result["AuthenticationResult"]["TokenType"].should.equal("Bearer")
|
||||
|
||||
# authenticate user once again this time with mfa token
|
||||
result = conn.initiate_auth(
|
||||
@ -3317,6 +3318,7 @@ def test_initiate_auth_USER_SRP_AUTH():
|
||||
)
|
||||
|
||||
result["ChallengeName"].should.equal("PASSWORD_VERIFIER")
|
||||
result["ChallengeParameters"]["USERNAME"].should.equal(username)
|
||||
|
||||
|
||||
@mock_cognitoidp
|
||||
@ -3385,6 +3387,7 @@ def test_initiate_auth_USER_PASSWORD_AUTH():
|
||||
result["AuthenticationResult"]["AccessToken"].should_not.be.none
|
||||
result["AuthenticationResult"]["IdToken"].should_not.be.none
|
||||
result["AuthenticationResult"]["RefreshToken"].should_not.be.none
|
||||
result["AuthenticationResult"]["TokenType"].should.equal("Bearer")
|
||||
|
||||
|
||||
@mock_cognitoidp
|
||||
|
Loading…
Reference in New Issue
Block a user