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));
|
new OrRequestMatcher(preferredMatchers));
|
||||||
}
|
}
|
||||||
|
|
||||||
httpSecurity.securityMatchers((securityMatchers) -> securityMatchers.requestMatchers(this.endpointsMatcher));
|
|
||||||
|
|
||||||
httpSecurity.csrf((csrf) -> csrf.ignoringRequestMatchers(this.endpointsMatcher));
|
httpSecurity.csrf((csrf) -> csrf.ignoringRequestMatchers(this.endpointsMatcher));
|
||||||
|
|
||||||
if (getConfigurer(OAuth2ClientRegistrationEndpointConfigurer.class) != null) {
|
if (getConfigurer(OAuth2ClientRegistrationEndpointConfigurer.class) != null) {
|
||||||
|
|
|
@ -132,10 +132,11 @@ public class SecurityConfig {
|
||||||
|
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
http
|
http
|
||||||
.oauth2AuthorizationServer((authorizationServer) ->
|
.oauth2AuthorizationServer((authorizationServer) -> {
|
||||||
|
http.securityMatcher(authorizationServer.getEndpointsMatcher());
|
||||||
authorizationServer
|
authorizationServer
|
||||||
.oidc(Customizer.withDefaults()) // Enable OpenID Connect 1.0
|
.oidc(Customizer.withDefaults()); // Enable OpenID Connect 1.0
|
||||||
)
|
})
|
||||||
.authorizeHttpRequests((authorize) ->
|
.authorizeHttpRequests((authorize) ->
|
||||||
authorize
|
authorize
|
||||||
.anyRequest().authenticated()
|
.anyRequest().authenticated()
|
||||||
|
|
Loading…
Reference in New Issue