Class NimbusJwtDecoder.JwkSourceJwtDecoderBuilder
java.lang.Object
org.springframework.security.oauth2.jwt.NimbusJwtDecoder.JwkSourceJwtDecoderBuilder
- Enclosing class:
- NimbusJwtDecoder
A builder for creating
NimbusJwtDecoder instances based on a
JWKSource.- Since:
- 7.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the configuredNimbusJwtDecoder.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 givenConsumerto customize theConfigurableJWTProcessorbefore passing it to the buildNimbusJwtDecoder.
-
Method Details
-
jwsAlgorithm
public NimbusJwtDecoder.JwkSourceJwtDecoderBuilder jwsAlgorithm(SignatureAlgorithm signatureAlgorithm) Append the given signing algorithm to the set of algorithms to use.- Parameters:
signatureAlgorithm- the algorithm to use- Returns:
- a
NimbusJwtDecoder.JwkSourceJwtDecoderBuilderfor further configurations
-
jwsAlgorithms
public NimbusJwtDecoder.JwkSourceJwtDecoderBuilder jwsAlgorithms(Consumer<Set<SignatureAlgorithm>> signatureAlgorithmsConsumer) Configure the list of algorithms to use with the givenConsumer.- Parameters:
signatureAlgorithmsConsumer- aConsumerfor further configuring the algorithm list- Returns:
- a
NimbusJwtDecoder.JwkSourceJwtDecoderBuilderfor further configurations
-
jwtProcessorCustomizer
public NimbusJwtDecoder.JwkSourceJwtDecoderBuilder jwtProcessorCustomizer(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.JwkSourceJwtDecoderBuilderfor further configurations - Since:
- 5.4
-
build
Build the configuredNimbusJwtDecoder.- Returns:
- the configured
NimbusJwtDecoder
-