-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Closed
Labels
in: configAn issue in spring-security-configAn issue in spring-security-configstatus: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: bugA general bugA general bug
Milestone
Description
Summary
When specifying a custom requiresAuthenticationMatcher in formLogin for WebFlux security, it is not used unless a custom authenticationEntryPoint is used.
Example configuration:
SecurityWebFilterChain securityWebFilter = this.http
.authorizeExchange()
.pathMatchers("/login", "/sign-in").permitAll()
.anyExchange().authenticated()
.and()
.formLogin()
.requiresAuthenticationMatcher(new PathPatternParserServerWebExchangeMatcher("/sign-in"))
.and()
.build();
Actual Behavior
Making a request to "/sign-in" does not perform authentication.
Making a POST to "/login" does perform authentication.
Expected Behavior
Making a request to "/sign-in" should perform authentication.
Making a POST to "/login" should not perform authentication.
Metadata
Metadata
Assignees
Labels
in: configAn issue in spring-security-configAn issue in spring-security-configstatus: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: bugA general bugA general bug