Skip to content

Commit 43ddf73

Browse files
committed
Polish Exception Message
This error message provides more context around which credentials failed. Issue gh-16494
1 parent 08f7146 commit 43ddf73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/org/springframework/security/authentication/ott/OneTimeTokenAuthenticationProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public Authentication authenticate(Authentication authentication) throws Authent
6262
return authenticated;
6363
}
6464
catch (UsernameNotFoundException ex) {
65-
throw new BadCredentialsException("Authentication failed.");
65+
throw new BadCredentialsException("Failed to authenticate the one-time token");
6666
}
6767
}
6868

0 commit comments

Comments
 (0)