mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-10-22 10:18:53 +00:00
Remove default HttpSecurity.securityMatcher() for authorization server
Closes gh-17965
This commit is contained in:
parent
7f10897de3
commit
681e166be8
@ -396,8 +396,6 @@ public final class OAuth2AuthorizationServerConfigurer
|
||||
new OrRequestMatcher(preferredMatchers));
|
||||
}
|
||||
|
||||
httpSecurity.securityMatchers((securityMatchers) -> securityMatchers.requestMatchers(this.endpointsMatcher));
|
||||
|
||||
httpSecurity.csrf((csrf) -> csrf.ignoringRequestMatchers(this.endpointsMatcher));
|
||||
|
||||
if (getConfigurer(OAuth2ClientRegistrationEndpointConfigurer.class) != null) {
|
||||
|
@ -132,10 +132,11 @@ public class SecurityConfig {
|
||||
|
||||
// @formatter:off
|
||||
http
|
||||
.oauth2AuthorizationServer((authorizationServer) ->
|
||||
.oauth2AuthorizationServer((authorizationServer) -> {
|
||||
http.securityMatcher(authorizationServer.getEndpointsMatcher());
|
||||
authorizationServer
|
||||
.oidc(Customizer.withDefaults()) // Enable OpenID Connect 1.0
|
||||
)
|
||||
.oidc(Customizer.withDefaults()); // Enable OpenID Connect 1.0
|
||||
})
|
||||
.authorizeHttpRequests((authorize) ->
|
||||
authorize
|
||||
.anyRequest().authenticated()
|
||||
|
Loading…
x
Reference in New Issue
Block a user