@@ -606,7 +606,7 @@ Or, exposing a `JwtDecoder` `@Bean` has the same effect as `decoder()`:
606
606
```java
607
607
@Bean
608
608
public JwtDecoder jwtDecoder() {
609
- return new NimbusJwtDecoderJwkSupport( jwkSetUri);
609
+ return new NimbusJwtDecoder(JwtProcessors.withJwkSetUri( jwkSetUri).build() );
610
610
}
611
611
```
612
612
@@ -719,7 +719,7 @@ Resource Server uses `JwtTimestampValidator` to verify a token's validity window
719
719
```java
720
720
@Bean
721
721
JwtDecoder jwtDecoder() {
722
- NimbusJwtDecoderJwkSupport jwtDecoder = (NimbusJwtDecoderJwkSupport )
722
+ NimbusJwtDecoder jwtDecoder = (NimbusJwtDecoder )
723
723
JwtDecoders.withOidcIssuerLocation(issuerUri);
724
724
725
725
OAuth2TokenValidator<Jwt> withClockSkew = new DelegatingOAuth2TokenValidator<>(
@@ -759,7 +759,7 @@ Then, to add into a resource server, it's a matter of specifying the `JwtDecoder
759
759
```java
760
760
@Bean
761
761
JwtDecoder jwtDecoder() {
762
- NimbusJwtDecoderJwkSupport jwtDecoder = (NimbusJwtDecoderJwkSupport )
762
+ NimbusJwtDecoder jwtDecoder = (NimbusJwtDecoder )
763
763
JwtDecoders.withOidcIssuerLocation(issuerUri);
764
764
765
765
OAuth2TokenValidator<Jwt> audienceValidator = new AudienceValidator();
@@ -807,11 +807,11 @@ An individual claim's conversion strategy can be configured using `MappedJwtClai
807
807
```java
808
808
@Bean
809
809
JwtDecoder jwtDecoder() {
810
- NimbusJwtDecoderJwkSupport jwtDecoder = new NimbusJwtDecoderJwkSupport( jwkSetUri);
810
+ NimbusJwtDecoder jwtDecoder = new NimbusJwtDecoder(JwtProcessors.withJwkSetUri( jwkSetUri).build() );
811
811
812
812
MappedJwtClaimSetConverter converter = MappedJwtClaimSetConverter
813
813
.withDefaults(Collections.singletonMap("sub", this::lookupUserIdBySub));
814
- jwtDecoder.setJwtClaimSetConverter (converter);
814
+ jwtDecoder.setClaimSetConverter (converter);
815
815
816
816
return jwtDecoder;
817
817
}
@@ -862,8 +862,8 @@ And then, the instance can be supplied like normal:
862
862
```java
863
863
@Bean
864
864
JwtDecoder jwtDecoder() {
865
- NimbusJwtDecoderJwkSupport jwtDecoder = new NimbusJwtDecoderJwkSupport( jwkSetUri);
866
- jwtDecoder.setJwtClaimSetConverter (new UsernameSubClaimAdapter());
865
+ NimbusJwtDecoder jwtDecoder = new NimbusJwtDecoder(JwtProcessors.withJwkSetUri( jwkSetUri).build() );
866
+ jwtDecoder.setClaimSetConverter (new UsernameSubClaimAdapter());
867
867
return jwtDecoder;
868
868
}
869
869
```
@@ -876,7 +876,7 @@ By default, Resource Server uses connection and socket timeouts of 30 seconds ea
876
876
This may be too short in some scenarios.
877
877
Further, it doesn't take into account more sophisticated patterns like back-off and discovery.
878
878
879
- To adjust the way in which Resource Server connects to the authorization server, `NimbusJwtDecoderJwkSupport ` accepts an instance of `RestOperations`:
879
+ To adjust the way in which Resource Server connects to the authorization server, `NimbusJwtDecoder ` accepts an instance of `RestOperations`:
880
880
881
881
```java
882
882
@Bean
@@ -886,8 +886,7 @@ public JwtDecoder jwtDecoder(RestTemplateBuilder builder) {
886
886
.setReadTimeout(60000)
887
887
.build();
888
888
889
- NimbusJwtDecoderJwkSupport jwtDecoder = new NimbusJwtDecoderJwkSupport(jwkSetUri);
890
- jwtDecoder.setRestOperations(rest);
889
+ NimbusJwtDecoder jwtDecoder = new NimbusJwtDecoder(JwtProcessors.withJwkSetUri(jwkSetUri).restOperations(rest).build());
891
890
return jwtDecoder;
892
891
}
893
892
```
0 commit comments