Class NimbusJwtDecoderJwkSupport

java.lang.Object
org.springframework.security.oauth2.jwt.NimbusJwtDecoderJwkSupport
All Implemented Interfaces:
JwtDecoder

@Deprecated public final class NimbusJwtDecoderJwkSupport extends Object implements JwtDecoder
Deprecated.
An implementation of a JwtDecoder that "decodes" a JSON Web Token (JWT) and additionally verifies it's digital signature if the JWT is a JSON Web Signature (JWS). The public key used for verification is obtained from the JSON Web Key (JWK) Set URL supplied via the constructor.

NOTE: This implementation uses the Nimbus JOSE + JWT SDK internally.

Since:
5.0
See Also:
  • Constructor Details

    • NimbusJwtDecoderJwkSupport

      public NimbusJwtDecoderJwkSupport(String jwkSetUrl)
      Deprecated.
      Constructs a NimbusJwtDecoderJwkSupport using the provided parameters.
      Parameters:
      jwkSetUrl - the JSON Web Key (JWK) Set URL
    • NimbusJwtDecoderJwkSupport

      public NimbusJwtDecoderJwkSupport(String jwkSetUrl, String jwsAlgorithm)
      Deprecated.
      Constructs a NimbusJwtDecoderJwkSupport using the provided parameters.
      Parameters:
      jwkSetUrl - the JSON Web Key (JWK) Set URL
      jwsAlgorithm - the JSON Web Algorithm (JWA) used for verifying the digital signatures
  • Method Details

    • decode

      public Jwt decode(String token) throws JwtException
      Deprecated.
      Description copied from interface: JwtDecoder
      Decodes the JWT from it's compact claims representation format and returns a Jwt.
      Specified by:
      decode in interface JwtDecoder
      Parameters:
      token - the JWT value
      Returns:
      a Jwt
      Throws:
      JwtException - if an error occurs while attempting to decode the JWT
    • setJwtValidator

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

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

      public void setRestOperations(org.springframework.web.client.RestOperations restOperations)
      Deprecated.
      Sets the RestOperations used when requesting the JSON Web Key (JWK) Set.
      Parameters:
      restOperations - the RestOperations used when requesting the JSON Web Key (JWK) Set
      Since:
      5.1