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
ConstructorsConstructorDescriptionNimbusJwtDecoderJwkSupport(String jwkSetUrl) Deprecated.Constructs aNimbusJwtDecoderJwkSupportusing the provided parameters.NimbusJwtDecoderJwkSupport(String jwkSetUrl, String jwsAlgorithm) Deprecated.Constructs aNimbusJwtDecoderJwkSupportusing the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Decodes the JWT from it's compact claims representation format and returns aJwt.voidsetClaimSetConverter(org.springframework.core.convert.converter.Converter<Map<String, Object>, Map<String, Object>> claimSetConverter) Deprecated.Use the followingConverterfor manipulating the JWT's claim setvoidsetJwtValidator(OAuth2TokenValidator<Jwt> jwtValidator) Deprecated.Use thisJwtValidatorvoidsetRestOperations(org.springframework.web.client.RestOperations restOperations) Deprecated.Sets theRestOperationsused when requesting the JSON Web Key (JWK) Set.
-
Constructor Details
-
NimbusJwtDecoderJwkSupport
Deprecated.Constructs aNimbusJwtDecoderJwkSupportusing the provided parameters.- Parameters:
jwkSetUrl- the JSON Web Key (JWK) SetURL
-
NimbusJwtDecoderJwkSupport
Deprecated.Constructs aNimbusJwtDecoderJwkSupportusing the provided parameters.- Parameters:
jwkSetUrl- the JSON Web Key (JWK) SetURLjwsAlgorithm- the JSON Web Algorithm (JWA) used for verifying the digital signatures
-
-
Method Details
-
decode
Deprecated.Description copied from interface:JwtDecoderDecodes the JWT from it's compact claims representation format and returns aJwt.- Specified by:
decodein interfaceJwtDecoder- Parameters:
token- the JWT value- Returns:
- a
Jwt - Throws:
JwtException- if an error occurs while attempting to decode the JWT
-
setJwtValidator
Deprecated.Use thisJwtValidator- 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 followingConverterfor manipulating the JWT's claim set- Parameters:
claimSetConverter- theConverterto use
-
setRestOperations
public void setRestOperations(org.springframework.web.client.RestOperations restOperations) Deprecated.Sets theRestOperationsused when requesting the JSON Web Key (JWK) Set.- Parameters:
restOperations- theRestOperationsused when requesting the JSON Web Key (JWK) Set- Since:
- 5.1
-
NimbusJwtDecoderorJwtDecodersinstead