Class NimbusJwtDecoder.JwkSetUriJwtDecoderBuilder
- java.lang.Object
-
- org.springframework.security.oauth2.jwt.NimbusJwtDecoder.JwkSetUriJwtDecoderBuilder
-
- Enclosing class:
- NimbusJwtDecoder
public static final class NimbusJwtDecoder.JwkSetUriJwtDecoderBuilder extends java.lang.ObjectA builder for creatingNimbusJwtDecoderinstances based on a JWK Set uri.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NimbusJwtDecoderbuild()Build the configuredNimbusJwtDecoder.NimbusJwtDecoder.JwkSetUriJwtDecoderBuildercache(org.springframework.cache.Cache cache)Use the givenCacheto store JWK Set.NimbusJwtDecoder.JwkSetUriJwtDecoderBuilderjwsAlgorithm(SignatureAlgorithm signatureAlgorithm)Append the given signing algorithm to the set of algorithms to use.NimbusJwtDecoder.JwkSetUriJwtDecoderBuilderjwsAlgorithms(java.util.function.Consumer<java.util.Set<SignatureAlgorithm>> signatureAlgorithmsConsumer)Configure the list of algorithms to use with the givenConsumer.NimbusJwtDecoder.JwkSetUriJwtDecoderBuilderjwtProcessorCustomizer(java.util.function.Consumer<com.nimbusds.jwt.proc.ConfigurableJWTProcessor<com.nimbusds.jose.proc.SecurityContext>> jwtProcessorCustomizer)Use the givenConsumerto customize theConfigurableJWTProcessorbefore passing it to the buildNimbusJwtDecoder.NimbusJwtDecoder.JwkSetUriJwtDecoderBuilderrestOperations(org.springframework.web.client.RestOperations restOperations)
-
-
-
Method Detail
-
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.JwkSetUriJwtDecoderBuilderfor further configurations
-
jwsAlgorithms
public NimbusJwtDecoder.JwkSetUriJwtDecoderBuilder jwsAlgorithms(java.util.function.Consumer<java.util.Set<SignatureAlgorithm>> signatureAlgorithmsConsumer)
Configure the list of algorithms to use with the givenConsumer.- Parameters:
signatureAlgorithmsConsumer- aConsumerfor further configuring the algorithm list- Returns:
- a
NimbusJwtDecoder.JwkSetUriJwtDecoderBuilderfor further configurations
-
restOperations
public NimbusJwtDecoder.JwkSetUriJwtDecoderBuilder restOperations(org.springframework.web.client.RestOperations restOperations)
Use the givenRestOperationsto coordinate with the authorization servers indicated in the JWK Set uri as well as the Issuer.- Parameters:
restOperations-- Returns:
-
cache
public NimbusJwtDecoder.JwkSetUriJwtDecoderBuilder cache(org.springframework.cache.Cache cache)
Use the givenCacheto store JWK Set.- Parameters:
cache- theCacheto be used to store JWK Set- Returns:
- a
NimbusJwtDecoder.JwkSetUriJwtDecoderBuilderfor further configurations - Since:
- 5.4
-
jwtProcessorCustomizer
public NimbusJwtDecoder.JwkSetUriJwtDecoderBuilder jwtProcessorCustomizer(java.util.function.Consumer<com.nimbusds.jwt.proc.ConfigurableJWTProcessor<com.nimbusds.jose.proc.SecurityContext>> jwtProcessorCustomizer)
Use the givenConsumerto customize theConfigurableJWTProcessorbefore passing it to the buildNimbusJwtDecoder.- Parameters:
jwtProcessorCustomizer- the callback used to alter the processor- Returns:
- a
NimbusJwtDecoder.JwkSetUriJwtDecoderBuilderfor further configurations - Since:
- 5.4
-
build
public NimbusJwtDecoder build()
Build the configuredNimbusJwtDecoder.- Returns:
- the configured
NimbusJwtDecoder
-
-