Browse Source

Adapt to recent changes in Spring Security snapshots

pull/17742/head
Stephane Nicoll 7 years ago
parent
commit
e52d398771
  1. 5
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerJwkConfiguration.java
  2. 2
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerOpaqueTokenConfiguration.java

5
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerJwkConfiguration.java

@ -90,14 +90,13 @@ class ReactiveOAuth2ResourceServerJwkConfiguration { @@ -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));
}

2
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerOpaqueTokenConfiguration.java

@ -58,7 +58,7 @@ class ReactiveOAuth2ResourceServerOpaqueTokenConfiguration { @@ -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();

Loading…
Cancel
Save