Fix typo in OAuth2TokenValidator doc

Fixes gh-6925
This commit is contained in:
Luca Graf 2019-05-31 20:23:18 +02:00 committed by Josh Cummings
parent 8e5dd19b3b
commit c43e632a6d
2 changed files with 4 additions and 4 deletions

View File

@ -341,7 +341,7 @@ Resource Server uses `JwtTimestampValidator` to verify a token's validity window
@Bean
ReactiveJwtDecoder jwtDecoder() {
NimbusReactiveJwtDecoder jwtDecoder = (NimbusReactiveJwtDecoder)
ReactiveJwtDecoders.withOidcIssuerLocation(issuerUri);
ReactiveJwtDecoders.fromOidcIssuerLocation(issuerUri);
OAuth2TokenValidator<Jwt> withClockSkew = new DelegatingOAuth2TokenValidator<>(
new JwtTimestampValidator(Duration.ofSeconds(60)),
@ -383,7 +383,7 @@ Then, to add into a resource server, it's a matter of specifying the `ReactiveJw
@Bean
ReactiveJwtDecoder jwtDecoder() {
NimbusReactiveJwtDecoder jwtDecoder = (NimbusReactiveJwtDecoder)
ReactiveJwtDecoders.withOidcIssuerLocation(issuerUri);
ReactiveJwtDecoders.fromOidcIssuerLocation(issuerUri);
OAuth2TokenValidator<Jwt> audienceValidator = new AudienceValidator();
OAuth2TokenValidator<Jwt> withIssuer = JwtValidators.createDefaultWithIssuer(issuerUri);

View File

@ -721,7 +721,7 @@ Resource Server uses `JwtTimestampValidator` to verify a token's validity window
@Bean
JwtDecoder jwtDecoder() {
NimbusJwtDecoder jwtDecoder = (NimbusJwtDecoder)
JwtDecoders.withOidcIssuerLocation(issuerUri);
JwtDecoders.fromOidcIssuerLocation(issuerUri);
OAuth2TokenValidator<Jwt> withClockSkew = new DelegatingOAuth2TokenValidator<>(
new JwtTimestampValidator(Duration.ofSeconds(60)),
@ -761,7 +761,7 @@ Then, to add into a resource server, it's a matter of specifying the `JwtDecoder
@Bean
JwtDecoder jwtDecoder() {
NimbusJwtDecoder jwtDecoder = (NimbusJwtDecoder)
JwtDecoders.withOidcIssuerLocation(issuerUri);
JwtDecoders.fromOidcIssuerLocation(issuerUri);
OAuth2TokenValidator<Jwt> audienceValidator = new AudienceValidator();
OAuth2TokenValidator<Jwt> withIssuer = JwtValidators.createDefaultWithIssuer(issuerUri);