Skip to content

Commit d839e4d

Browse files
committed
Fix typos in resource server docs
- Use withJwkSetUri instead of fromJwkSetUri - Use ES512 instead of EC512 - Use NimbusReactiveOpaqueTokenIntrospector instead of NimbusOpaqueTokenIntrospector in reactive - User authorizeExchange instead of authorizeRequests
1 parent 94cf4d1 commit d839e4d

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

docs/manual/src/docs/asciidoc/_includes/reactive/oauth2/resource-server.adoc

+10-10
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ For greater power, though, we can use a builder that ships with `NimbusReactiveJ
271271
----
272272
@Bean
273273
ReactiveJwtDecoder jwtDecoder() {
274-
return NimbusReactiveJwtDecoder.fromJwkSetUri(this.jwkSetUri)
274+
return NimbusReactiveJwtDecoder.withJwkSetUri(this.jwkSetUri)
275275
.jwsAlgorithm(RS512).build();
276276
}
277277
----
@@ -282,8 +282,8 @@ Calling `jwsAlgorithm` more than once will configure `NimbusReactiveJwtDecoder`
282282
----
283283
@Bean
284284
ReactiveJwtDecoder jwtDecoder() {
285-
return NimbusReactiveJwtDecoder.fromJwkSetUri(this.jwkSetUri)
286-
.jwsAlgorithm(RS512).jwsAlgorithm(EC512).build();
285+
return NimbusReactiveJwtDecoder.withJwkSetUri(this.jwkSetUri)
286+
.jwsAlgorithm(RS512).jwsAlgorithm(ES512).build();
287287
}
288288
----
289289

@@ -293,10 +293,10 @@ Or, you can call `jwsAlgorithms`:
293293
----
294294
@Bean
295295
ReactiveJwtDecoder jwtDecoder() {
296-
return NimbusReactiveJwtDecoder.fromJwkSetUri(this.jwkSetUri)
296+
return NimbusReactiveJwtDecoder.withJwkSetUri(this.jwkSetUri)
297297
.jwsAlgorithms(algorithms -> {
298298
algorithms.add(RS512);
299-
algorithms.add(EC512);
299+
algorithms.add(ES512);
300300
}).build();
301301
}
302302
----
@@ -789,7 +789,7 @@ Or, exposing a `ReactiveOpaqueTokenIntrospector` `@Bean` has the same effect as
789789
----
790790
@Bean
791791
public ReactiveOpaqueTokenIntrospector introspector() {
792-
return new NimbusOpaqueTokenIntrospector(introspectionUri, clientId, clientSecret);
792+
return new NimbusReactiveOpaqueTokenIntrospector(introspectionUri, clientId, clientSecret);
793793
}
794794
----
795795

@@ -1036,8 +1036,8 @@ JwtIssuerReactiveAuthenticationManagerResolver authenticationManagerResolver = n
10361036
("https://idp.example.org/issuerOne", "https://idp.example.org/issuerTwo");
10371037
10381038
http
1039-
.authorizeRequests(authorize -> authorize
1040-
.anyRequest().authenticated()
1039+
.authorizeExchange(exchanges -> exchanges
1040+
.anyExchange().authenticated()
10411041
)
10421042
.oauth2ResourceServer(oauth2 -> oauth2
10431043
.authenticationManagerResolver(authenticationManagerResolver)
@@ -1070,8 +1070,8 @@ JwtIssuerReactiveAuthenticationManagerResolver authenticationManagerResolver =
10701070
new JwtIssuerReactiveAuthenticationManagerResolver(authenticationManagers::get);
10711071
10721072
http
1073-
.authorizeRequests(authorize -> authorize
1074-
.anyRequest().authenticated()
1073+
.authorizeExchange(exchanges -> exchanges
1074+
.anyExchange().authenticated()
10751075
)
10761076
.oauth2ResourceServer(oauth2 -> oauth2
10771077
.authenticationManagerResolver(authenticationManagerResolver)

docs/manual/src/docs/asciidoc/_includes/servlet/oauth2/oauth2-resourceserver.adoc

+5-5
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ For greater power, though, we can use a builder that ships with `NimbusJwtDecode
496496
----
497497
@Bean
498498
JwtDecoder jwtDecoder() {
499-
return NimbusJwtDecoder.fromJwkSetUri(this.jwkSetUri)
499+
return NimbusJwtDecoder.withJwkSetUri(this.jwkSetUri)
500500
.jwsAlgorithm(RS512).build();
501501
}
502502
----
@@ -507,8 +507,8 @@ Calling `jwsAlgorithm` more than once will configure `NimbusJwtDecoder` to trust
507507
----
508508
@Bean
509509
JwtDecoder jwtDecoder() {
510-
return NimbusJwtDecoder.fromJwkSetUri(this.jwkSetUri)
511-
.jwsAlgorithm(RS512).jwsAlgorithm(EC512).build();
510+
return NimbusJwtDecoder.withJwkSetUri(this.jwkSetUri)
511+
.jwsAlgorithm(RS512).jwsAlgorithm(ES512).build();
512512
}
513513
----
514514

@@ -518,10 +518,10 @@ Or, you can call `jwsAlgorithms`:
518518
----
519519
@Bean
520520
JwtDecoder jwtDecoder() {
521-
return NimbusJwtDecoder.fromJwkSetUri(this.jwkSetUri)
521+
return NimbusJwtDecoder.withJwkSetUri(this.jwkSetUri)
522522
.jwsAlgorithms(algorithms -> {
523523
algorithms.add(RS512);
524-
algorithms.add(EC512);
524+
algorithms.add(ES512);
525525
}).build();
526526
}
527527
----

0 commit comments

Comments
 (0)