Class NimbusJwtDecoderJwkSupport
java.lang.Object
org.springframework.security.oauth2.jwt.NimbusJwtDecoderJwkSupport
- All Implemented Interfaces:
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.
-
Constructor Summary
ConstructorDescriptionNimbusJwtDecoderJwkSupport
(String jwkSetUrl) Deprecated.Constructs aNimbusJwtDecoderJwkSupport
using the provided parameters.NimbusJwtDecoderJwkSupport
(String jwkSetUrl, String jwsAlgorithm) Deprecated.Constructs aNimbusJwtDecoderJwkSupport
using the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Decodes the JWT from it's compact claims representation format and returns aJwt
.void
setClaimSetConverter
(org.springframework.core.convert.converter.Converter<Map<String, Object>, Map<String, 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 Details
-
NimbusJwtDecoderJwkSupport
Deprecated.Constructs aNimbusJwtDecoderJwkSupport
using the provided parameters.- Parameters:
jwkSetUrl
- the JSON Web Key (JWK) SetURL
-
NimbusJwtDecoderJwkSupport
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 Details
-
decode
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
Deprecated.Use thisJwt
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 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
-
NimbusJwtDecoder
orJwtDecoders
instead