Class NimbusJwtDecoderJwkSupport
- java.lang.Object
-
- org.springframework.security.oauth2.jwt.NimbusJwtDecoderJwkSupport
-
- All Implemented Interfaces:
JwtDecoder
@Deprecated public final class NimbusJwtDecoderJwkSupport extends java.lang.Object implements JwtDecoder
Deprecated.UseNimbusJwtDecoder
orJwtDecoders
insteadAn implementation of aJwtDecoder
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) SetURL
supplied via the constructor.NOTE: This implementation uses the Nimbus JOSE + JWT SDK internally.
- Since:
- 5.0
- See Also:
JwtDecoder
,NimbusJwtDecoder
, JSON Web Token (JWT), JSON Web Signature (JWS), JSON Web Key (JWK), Nimbus JOSE + JWT SDK
-
-
Constructor Summary
Constructors Constructor Description NimbusJwtDecoderJwkSupport(java.lang.String jwkSetUrl)
Deprecated.Constructs aNimbusJwtDecoderJwkSupport
using the provided parameters.NimbusJwtDecoderJwkSupport(java.lang.String jwkSetUrl, java.lang.String jwsAlgorithm)
Deprecated.Constructs aNimbusJwtDecoderJwkSupport
using the provided parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Jwt
decode(java.lang.String token)
Deprecated.Decodes the JWT from it's compact claims representation format and returns aJwt
.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)
Deprecated.Use the followingConverter
for manipulating the JWT's claim setvoid
setJwtValidator(OAuth2TokenValidator<Jwt> jwtValidator)
Deprecated.Use thisJwt
Validatorvoid
setRestOperations(org.springframework.web.client.RestOperations restOperations)
Deprecated.Sets theRestOperations
used when requesting the JSON Web Key (JWK) Set.
-
-
-
Constructor Detail
-
NimbusJwtDecoderJwkSupport
public NimbusJwtDecoderJwkSupport(java.lang.String jwkSetUrl)
Deprecated.Constructs aNimbusJwtDecoderJwkSupport
using the provided parameters.- Parameters:
jwkSetUrl
- the JSON Web Key (JWK) SetURL
-
NimbusJwtDecoderJwkSupport
public NimbusJwtDecoderJwkSupport(java.lang.String jwkSetUrl, java.lang.String jwsAlgorithm)
Deprecated.Constructs aNimbusJwtDecoderJwkSupport
using the provided parameters.- Parameters:
jwkSetUrl
- the JSON Web Key (JWK) SetURL
jwsAlgorithm
- the JSON Web Algorithm (JWA) used for verifying the digital signatures
-
-
Method Detail
-
decode
public Jwt decode(java.lang.String token) throws JwtException
Deprecated.Description copied from interface:JwtDecoder
Decodes the JWT from it's compact claims representation format and returns aJwt
.- Specified by:
decode
in interfaceJwtDecoder
- 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 thisJwt
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)
Deprecated.Use the followingConverter
for manipulating the JWT's claim set- Parameters:
claimSetConverter
- theConverter
to use
-
setRestOperations
public void setRestOperations(org.springframework.web.client.RestOperations restOperations)
Deprecated.Sets theRestOperations
used when requesting the JSON Web Key (JWK) Set.- Parameters:
restOperations
- theRestOperations
used when requesting the JSON Web Key (JWK) Set- Since:
- 5.1
-
-