Class NimbusJwtDecoder.SecretKeyJwtDecoderBuilder
java.lang.Object
org.springframework.security.oauth2.jwt.NimbusJwtDecoder.SecretKeyJwtDecoderBuilder
- Enclosing class:
- NimbusJwtDecoder
A builder for creating
NimbusJwtDecoder instances based on a
SecretKey.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the configuredNimbusJwtDecoder.jwtProcessorCustomizer(Consumer<com.nimbusds.jwt.proc.ConfigurableJWTProcessor<com.nimbusds.jose.proc.SecurityContext>> jwtProcessorCustomizer) Use the givenConsumerto customize theConfigurableJWTProcessorbefore passing it to the buildNimbusJwtDecoder.macAlgorithm(MacAlgorithm macAlgorithm) Use the given algorithm when generating the MAC.
-
Method Details
-
macAlgorithm
Use the given algorithm when generating the MAC. The value should be one of HS256, HS384 or HS512.- Parameters:
macAlgorithm- the MAC algorithm to use- Returns:
- a
NimbusJwtDecoder.SecretKeyJwtDecoderBuilderfor further configurations
-
jwtProcessorCustomizer
public NimbusJwtDecoder.SecretKeyJwtDecoderBuilder 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.SecretKeyJwtDecoderBuilderfor further configurations - Since:
- 5.4
-
build
Build the configuredNimbusJwtDecoder.- Returns:
- the configured
NimbusJwtDecoder
-