Add an explicit "incorrect password" authentication failure reason

This commit is contained in:
Jon Chambers authored and Jon Chambers committed 2024-06-10 17:16:32 -04:00
1 parent 0871d6ebc1
commit 138b368951
1 file changed
+3 -2
@@ -108,9 +108,10 @@ public class AccountAuthenticator implements Authenticator<BasicCredentials, Aut
SaltedTokenHash.generateFor(basicCredentials.getPassword())); // new credentials have current version
}
return Optional.of(new AuthenticatedAccount(authenticatedAccount, device.get()));
} else {
failureReason = "incorrectPassword";
return Optional.empty();
}
return Optional.empty();
} catch (IllegalArgumentException | InvalidAuthorizationHeaderException iae) {
failureReason = "invalidHeader";
return Optional.empty();