Class NimbusJwtDecoder.JwkSetUriJwtDecoderBuilder
java.lang.Object
org.springframework.security.oauth2.jwt.NimbusJwtDecoder.JwkSetUriJwtDecoderBuilder
- Enclosing class:
- NimbusJwtDecoder
A builder for creating
NimbusJwtDecoder
instances based on a
JWK Set
uri.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the configuredNimbusJwtDecoder
.cache
(org.springframework.cache.Cache cache) Use the givenCache
to store JWK Set.jwsAlgorithm
(SignatureAlgorithm signatureAlgorithm) Append the given signing algorithm to the set of algorithms to use.jwsAlgorithms
(Consumer<Set<SignatureAlgorithm>> signatureAlgorithmsConsumer) Configure the list of algorithms to use with the givenConsumer
.jwtProcessorCustomizer
(Consumer<com.nimbusds.jwt.proc.ConfigurableJWTProcessor<com.nimbusds.jose.proc.SecurityContext>> jwtProcessorCustomizer) Use the givenConsumer
to customize theConfigurableJWTProcessor
before passing it to the buildNimbusJwtDecoder
.restOperations
(org.springframework.web.client.RestOperations restOperations)
-
Method Details
-
jwsAlgorithm
public NimbusJwtDecoder.JwkSetUriJwtDecoderBuilder jwsAlgorithm(SignatureAlgorithm signatureAlgorithm) Append the given signing algorithm to the set of algorithms to use.- Parameters:
signatureAlgorithm
- the algorithm to use- Returns:
- a
NimbusJwtDecoder.JwkSetUriJwtDecoderBuilder
for further configurations
-
jwsAlgorithms
public NimbusJwtDecoder.JwkSetUriJwtDecoderBuilder jwsAlgorithms(Consumer<Set<SignatureAlgorithm>> signatureAlgorithmsConsumer) Configure the list of algorithms to use with the givenConsumer
.- Parameters:
signatureAlgorithmsConsumer
- aConsumer
for further configuring the algorithm list- Returns:
- a
NimbusJwtDecoder.JwkSetUriJwtDecoderBuilder
for further configurations
-
restOperations
public NimbusJwtDecoder.JwkSetUriJwtDecoderBuilder restOperations(org.springframework.web.client.RestOperations restOperations) Use the givenRestOperations
to coordinate with the authorization servers indicated in the JWK Set uri as well as the Issuer.- Parameters:
restOperations
-- Returns:
-
cache
Use the givenCache
to store JWK Set.- Parameters:
cache
- theCache
to be used to store JWK Set- Returns:
- a
NimbusJwtDecoder.JwkSetUriJwtDecoderBuilder
for further configurations - Since:
- 5.4
-
jwtProcessorCustomizer
public NimbusJwtDecoder.JwkSetUriJwtDecoderBuilder jwtProcessorCustomizer(Consumer<com.nimbusds.jwt.proc.ConfigurableJWTProcessor<com.nimbusds.jose.proc.SecurityContext>> jwtProcessorCustomizer) Use the givenConsumer
to customize theConfigurableJWTProcessor
before passing it to the buildNimbusJwtDecoder
.- Parameters:
jwtProcessorCustomizer
- the callback used to alter the processor- Returns:
- a
NimbusJwtDecoder.JwkSetUriJwtDecoderBuilder
for further configurations - Since:
- 5.4
-
build
Build the configuredNimbusJwtDecoder
.- Returns:
- the configured
NimbusJwtDecoder
-