mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
fix(cognito): reject self-managed verification status (#2532)
This commit is contained in:
1 parent
2e8cbc13d7
commit
f8597bdef9
2 files changed
+42
-1
No files matched your search
@@ -1734,7 +1734,17 @@ public class CognitoService implements ResourceProvider {
|
||||
validateOriginJtiNotRevoked(accessToken, poolId);
|
||||
Long iat = extractIatFromToken(accessToken);
|
||||
validateUserNotGloballySignedOut(username, poolId, "access", iat != null ? iat : 0L);
|
||||
|
||||
|
||||
String verificationStatusAttribute = attributes.containsKey("email_verified")
|
||||
? "email_verified"
|
||||
: attributes.containsKey("phone_number_verified") ? "phone_number_verified" : null;
|
||||
if (verificationStatusAttribute != null) {
|
||||
throw new AwsException("InvalidParameterException",
|
||||
"Invalid user attributes: " + verificationStatusAttribute
|
||||
+ ": Attribute cannot be updated.",
|
||||
400);
|
||||
}
|
||||
|
||||
adminUpdateUserAttributes(poolId, username, attributes);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user