Class NimbusJwtDecoder

  • All Implemented Interfaces:
    JwtDecoder

    public final class NimbusJwtDecoder
    extends java.lang.Object
    implements JwtDecoder
    A low-level Nimbus implementation of JwtDecoder which takes a raw Nimbus configuration.
    Since:
    5.2
    • Constructor Detail

      • NimbusJwtDecoder

        public NimbusJwtDecoder​(com.nimbusds.jwt.proc.JWTProcessor<com.nimbusds.jose.proc.SecurityContext> jwtProcessor)
        Configures a NimbusJwtDecoder with the given parameters
        Parameters:
        jwtProcessor - - the JWTProcessor to use
    • Method Detail

      • setJwtValidator

        public void setJwtValidator​(OAuth2TokenValidator<Jwt> jwtValidator)
        Use this Jwt Validator
        Parameters:
        jwtValidator - - the Jwt Validator to use
      • setClaimSetConverter

        public void setClaimSetConverter​(org.springframework.core.convert.converter.Converter<java.util.Map<java.lang.String,​java.lang.Object>,​java.util.Map<java.lang.String,​java.lang.Object>> claimSetConverter)
        Use the following Converter for manipulating the JWT's claim set
        Parameters:
        claimSetConverter - the Converter to use
      • decode

        public Jwt decode​(java.lang.String token)
                   throws JwtException
        Decode and validate the JWT from its compact claims representation format
        Specified by:
        decode in interface JwtDecoder
        Parameters:
        token - the JWT value
        Returns:
        a validated Jwt
        Throws:
        JwtException