|
|
|
|
@ -2322,6 +2322,10 @@ public final class HttpSecurity extends
@@ -2322,6 +2322,10 @@ public final class HttpSecurity extends
|
|
|
|
|
* @Configuration |
|
|
|
|
* @EnableWebSecurity |
|
|
|
|
* public class OAuth2ClientSecurityConfig extends WebSecurityConfigurerAdapter { |
|
|
|
|
* |
|
|
|
|
* @Value("${spring.security.oauth2.resourceserver.jwt.key-value}") |
|
|
|
|
* RSAPublicKey key; |
|
|
|
|
* |
|
|
|
|
* @Override |
|
|
|
|
* protected void configure(HttpSecurity http) throws Exception { |
|
|
|
|
* http |
|
|
|
|
@ -2333,14 +2337,14 @@ public final class HttpSecurity extends
@@ -2333,14 +2337,14 @@ public final class HttpSecurity extends
|
|
|
|
|
* oauth2ResourceServer |
|
|
|
|
* .jwt(jwt -> |
|
|
|
|
* jwt |
|
|
|
|
* .jwtAuthenticationConverter(jwtDecoder()) |
|
|
|
|
* .decoder(jwtDecoder()) |
|
|
|
|
* ) |
|
|
|
|
* ); |
|
|
|
|
* } |
|
|
|
|
* |
|
|
|
|
* @Bean |
|
|
|
|
* public JwtDecoder jwtDecoder() { |
|
|
|
|
* return JwtDecoders.fromOidcIssuerLocation(issuerUri); |
|
|
|
|
* return NimbusJwtDecoder.withPublicKey(this.key).build(); |
|
|
|
|
* } |
|
|
|
|
* } |
|
|
|
|
* </pre> |
|
|
|
|
|