mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
fix(cognito): accept USER_SRP_AUTH in AdminInitiateAuth (#3973)
AdminInitiateAuth documents USER_SRP_AUTH as a valid AuthFlow, but only the ADMIN_USER_SRP_AUTH spelling, which is not an AuthFlowType value, was mapped. Accept the SDK spelling alongside it.
This commit is contained in:
1 parent
db2e0ab8d7
commit
2d56d85e9e
3 files changed
+15
-2
No files matched your search
@@ -191,6 +191,19 @@ class CognitoServiceTest {
|
||||
assertTrue(result.containsKey("AuthenticationResult"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void adminInitiateAuthAcceptsTheSdkSpellingOfSrpAuth() {
|
||||
UserPool pool = createPoolAndUser();
|
||||
UserPoolClient client = service.createUserPoolClient(
|
||||
pool.getId(), "client", false, false, List.of(), List.of());
|
||||
|
||||
AwsException exception = assertThrows(AwsException.class, () ->
|
||||
service.adminInitiateAuth(pool.getId(), client.getClientId(), "USER_SRP_AUTH",
|
||||
Map.of("USERNAME", "alice")));
|
||||
|
||||
assertEquals("USERNAME and SRP_A are required", exception.getMessage());
|
||||
}
|
||||
|
||||
@ParameterizedTest
|
||||
@CsvSource({
|
||||
"Short1!a",
|
||||
|
||||
Reference in new issue
Block a user