From e52d3987717d09da26e72641b2b37b1bf601595b Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Tue, 30 Jul 2019 17:36:51 +0200 Subject: [PATCH] Adapt to recent changes in Spring Security snapshots --- .../ReactiveOAuth2ResourceServerJwkConfiguration.java | 5 ++--- ...ReactiveOAuth2ResourceServerOpaqueTokenConfiguration.java | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerJwkConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerJwkConfiguration.java index 4607d7e4574..356c0786217 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerJwkConfiguration.java +++ b/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 { @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)); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerOpaqueTokenConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerOpaqueTokenConfiguration.java index b5a414e718a..a85d42813a9 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerOpaqueTokenConfiguration.java +++ b/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 { @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();