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