mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-31 09:12:14 +00:00
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
This commit is contained in:
parent
94cf4d1de7
commit
d839e4dd71
@ -271,7 +271,7 @@ For greater power, though, we can use a builder that ships with `NimbusReactiveJ
|
|||||||
----
|
----
|
||||||
@Bean
|
@Bean
|
||||||
ReactiveJwtDecoder jwtDecoder() {
|
ReactiveJwtDecoder jwtDecoder() {
|
||||||
return NimbusReactiveJwtDecoder.fromJwkSetUri(this.jwkSetUri)
|
return NimbusReactiveJwtDecoder.withJwkSetUri(this.jwkSetUri)
|
||||||
.jwsAlgorithm(RS512).build();
|
.jwsAlgorithm(RS512).build();
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
@ -282,8 +282,8 @@ Calling `jwsAlgorithm` more than once will configure `NimbusReactiveJwtDecoder`
|
|||||||
----
|
----
|
||||||
@Bean
|
@Bean
|
||||||
ReactiveJwtDecoder jwtDecoder() {
|
ReactiveJwtDecoder jwtDecoder() {
|
||||||
return NimbusReactiveJwtDecoder.fromJwkSetUri(this.jwkSetUri)
|
return NimbusReactiveJwtDecoder.withJwkSetUri(this.jwkSetUri)
|
||||||
.jwsAlgorithm(RS512).jwsAlgorithm(EC512).build();
|
.jwsAlgorithm(RS512).jwsAlgorithm(ES512).build();
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
@ -293,10 +293,10 @@ Or, you can call `jwsAlgorithms`:
|
|||||||
----
|
----
|
||||||
@Bean
|
@Bean
|
||||||
ReactiveJwtDecoder jwtDecoder() {
|
ReactiveJwtDecoder jwtDecoder() {
|
||||||
return NimbusReactiveJwtDecoder.fromJwkSetUri(this.jwkSetUri)
|
return NimbusReactiveJwtDecoder.withJwkSetUri(this.jwkSetUri)
|
||||||
.jwsAlgorithms(algorithms -> {
|
.jwsAlgorithms(algorithms -> {
|
||||||
algorithms.add(RS512);
|
algorithms.add(RS512);
|
||||||
algorithms.add(EC512);
|
algorithms.add(ES512);
|
||||||
}).build();
|
}).build();
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
@ -789,7 +789,7 @@ Or, exposing a `ReactiveOpaqueTokenIntrospector` `@Bean` has the same effect as
|
|||||||
----
|
----
|
||||||
@Bean
|
@Bean
|
||||||
public ReactiveOpaqueTokenIntrospector introspector() {
|
public ReactiveOpaqueTokenIntrospector introspector() {
|
||||||
return new NimbusOpaqueTokenIntrospector(introspectionUri, clientId, clientSecret);
|
return new NimbusReactiveOpaqueTokenIntrospector(introspectionUri, clientId, clientSecret);
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
@ -1036,8 +1036,8 @@ JwtIssuerReactiveAuthenticationManagerResolver authenticationManagerResolver = n
|
|||||||
("https://idp.example.org/issuerOne", "https://idp.example.org/issuerTwo");
|
("https://idp.example.org/issuerOne", "https://idp.example.org/issuerTwo");
|
||||||
|
|
||||||
http
|
http
|
||||||
.authorizeRequests(authorize -> authorize
|
.authorizeExchange(exchanges -> exchanges
|
||||||
.anyRequest().authenticated()
|
.anyExchange().authenticated()
|
||||||
)
|
)
|
||||||
.oauth2ResourceServer(oauth2 -> oauth2
|
.oauth2ResourceServer(oauth2 -> oauth2
|
||||||
.authenticationManagerResolver(authenticationManagerResolver)
|
.authenticationManagerResolver(authenticationManagerResolver)
|
||||||
@ -1070,8 +1070,8 @@ JwtIssuerReactiveAuthenticationManagerResolver authenticationManagerResolver =
|
|||||||
new JwtIssuerReactiveAuthenticationManagerResolver(authenticationManagers::get);
|
new JwtIssuerReactiveAuthenticationManagerResolver(authenticationManagers::get);
|
||||||
|
|
||||||
http
|
http
|
||||||
.authorizeRequests(authorize -> authorize
|
.authorizeExchange(exchanges -> exchanges
|
||||||
.anyRequest().authenticated()
|
.anyExchange().authenticated()
|
||||||
)
|
)
|
||||||
.oauth2ResourceServer(oauth2 -> oauth2
|
.oauth2ResourceServer(oauth2 -> oauth2
|
||||||
.authenticationManagerResolver(authenticationManagerResolver)
|
.authenticationManagerResolver(authenticationManagerResolver)
|
||||||
|
@ -496,7 +496,7 @@ For greater power, though, we can use a builder that ships with `NimbusJwtDecode
|
|||||||
----
|
----
|
||||||
@Bean
|
@Bean
|
||||||
JwtDecoder jwtDecoder() {
|
JwtDecoder jwtDecoder() {
|
||||||
return NimbusJwtDecoder.fromJwkSetUri(this.jwkSetUri)
|
return NimbusJwtDecoder.withJwkSetUri(this.jwkSetUri)
|
||||||
.jwsAlgorithm(RS512).build();
|
.jwsAlgorithm(RS512).build();
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
@ -507,8 +507,8 @@ Calling `jwsAlgorithm` more than once will configure `NimbusJwtDecoder` to trust
|
|||||||
----
|
----
|
||||||
@Bean
|
@Bean
|
||||||
JwtDecoder jwtDecoder() {
|
JwtDecoder jwtDecoder() {
|
||||||
return NimbusJwtDecoder.fromJwkSetUri(this.jwkSetUri)
|
return NimbusJwtDecoder.withJwkSetUri(this.jwkSetUri)
|
||||||
.jwsAlgorithm(RS512).jwsAlgorithm(EC512).build();
|
.jwsAlgorithm(RS512).jwsAlgorithm(ES512).build();
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
@ -518,10 +518,10 @@ Or, you can call `jwsAlgorithms`:
|
|||||||
----
|
----
|
||||||
@Bean
|
@Bean
|
||||||
JwtDecoder jwtDecoder() {
|
JwtDecoder jwtDecoder() {
|
||||||
return NimbusJwtDecoder.fromJwkSetUri(this.jwkSetUri)
|
return NimbusJwtDecoder.withJwkSetUri(this.jwkSetUri)
|
||||||
.jwsAlgorithms(algorithms -> {
|
.jwsAlgorithms(algorithms -> {
|
||||||
algorithms.add(RS512);
|
algorithms.add(RS512);
|
||||||
algorithms.add(EC512);
|
algorithms.add(ES512);
|
||||||
}).build();
|
}).build();
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
Loading…
x
Reference in New Issue
Block a user