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:
minseok.park 2025-03-10 08:57:10 +09:00 committed by Josh Cummings
parent 349964620e
commit 88a38013bb

View File

@ -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();
}