Fixing the bug where the custom authentication failure handler wasn't being invoked

This was because we need a custom authentication entry point to override the failure handler as well.
This commit is contained in:
Arpit Mohan 2020-01-02 17:25:34 +05:30
parent 4677e26c3d
commit 99010d08dc

View File

@ -113,6 +113,7 @@ public class SecurityConfig {
.anyExchange()
.authenticated()
.and().formLogin()
.authenticationEntryPoint(authenticationEntryPoint)
.requiresAuthenticationMatcher(ServerWebExchangeMatchers.pathMatchers(HttpMethod.POST, "/login"))
.authenticationSuccessHandler(authenticationSuccessHandler)
.authenticationFailureHandler(authenticationFailureHandler)