mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-22 03:52:15 +00:00
Add validation for auth checks in AbstractUserDetailsAuthenticationProvider
Add assertions to validate that preAuthenticationChecks and postAuthenticationChecks are not null during initialization. This allows errors to be detected earlier in the application lifecycle. Closes PR-16710 Signed-off-by: minseok.park <minseok.park@hyosung.com>
This commit is contained in:
parent
349964620e
commit
88a38013bb
@ -117,6 +117,8 @@ public abstract class AbstractUserDetailsAuthenticationProvider
|
||||
public final void afterPropertiesSet() throws Exception {
|
||||
Assert.notNull(this.userCache, "A user cache must be set");
|
||||
Assert.notNull(this.messages, "A message source must be set");
|
||||
Assert.notNull(this.preAuthenticationChecks, "A pre authentication checks must be set");
|
||||
Assert.notNull(this.postAuthenticationChecks, "A post authentication checks must be set");
|
||||
doAfterPropertiesSet();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user