Adapt to recent changes in Spring Security snapshots
This commit is contained in:
@@ -90,14 +90,13 @@ class ReactiveOAuth2ResourceServerJwkConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnBean(ReactiveJwtDecoder.class)
|
||||
SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http, ReactiveJwtDecoder jwtDecoder)
|
||||
throws Exception {
|
||||
SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http, ReactiveJwtDecoder jwtDecoder) {
|
||||
http.authorizeExchange((exchanges) -> exchanges.anyExchange().authenticated());
|
||||
http.oauth2ResourceServer((server) -> customDecoder(server, jwtDecoder));
|
||||
return http.build();
|
||||
}
|
||||
|
||||
private void customDecoder(OAuth2ResourceServerSpec server, ReactiveJwtDecoder decoder) throws Exception {
|
||||
private void customDecoder(OAuth2ResourceServerSpec server, ReactiveJwtDecoder decoder) {
|
||||
server.jwt((jwt) -> jwt.jwtDecoder(decoder));
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ class ReactiveOAuth2ResourceServerOpaqueTokenConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnBean(ReactiveOAuth2TokenIntrospectionClient.class)
|
||||
SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) throws Exception {
|
||||
SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
|
||||
http.authorizeExchange((exchanges) -> exchanges.anyExchange().authenticated());
|
||||
http.oauth2ResourceServer(OAuth2ResourceServerSpec::opaqueToken);
|
||||
return http.build();
|
||||
|
||||
Reference in New Issue
Block a user