From c43e632a6dd6a762916c51b60a9ad304a6ae770e Mon Sep 17 00:00:00 2001 From: Luca Graf Date: Fri, 31 May 2019 20:23:18 +0200 Subject: [PATCH] Fix typo in OAuth2TokenValidator doc Fixes gh-6925 --- .../asciidoc/_includes/reactive/oauth2/resource-server.adoc | 4 ++-- .../_includes/servlet/preface/java-configuration.adoc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/manual/src/docs/asciidoc/_includes/reactive/oauth2/resource-server.adoc b/docs/manual/src/docs/asciidoc/_includes/reactive/oauth2/resource-server.adoc index c973e9728f..6e7a4667e2 100644 --- a/docs/manual/src/docs/asciidoc/_includes/reactive/oauth2/resource-server.adoc +++ b/docs/manual/src/docs/asciidoc/_includes/reactive/oauth2/resource-server.adoc @@ -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 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 audienceValidator = new AudienceValidator(); OAuth2TokenValidator withIssuer = JwtValidators.createDefaultWithIssuer(issuerUri); diff --git a/docs/manual/src/docs/asciidoc/_includes/servlet/preface/java-configuration.adoc b/docs/manual/src/docs/asciidoc/_includes/servlet/preface/java-configuration.adoc index ef896b138b..5990618e51 100644 --- a/docs/manual/src/docs/asciidoc/_includes/servlet/preface/java-configuration.adoc +++ b/docs/manual/src/docs/asciidoc/_includes/servlet/preface/java-configuration.adoc @@ -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 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 audienceValidator = new AudienceValidator(); OAuth2TokenValidator withIssuer = JwtValidators.createDefaultWithIssuer(issuerUri);