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.UseNimbusJwtDecoderorJwtDecodersinsteadAn implementation of aJwtDecoderthat "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) SetURLsupplied 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 aNimbusJwtDecoderJwkSupportusing the provided parameters.NimbusJwtDecoderJwkSupport(java.lang.String jwkSetUrl, java.lang.String jwsAlgorithm)Deprecated.Constructs aNimbusJwtDecoderJwkSupportusing the provided parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Jwtdecode(java.lang.String token)Deprecated.Decodes the JWT from it's compact claims representation format and returns aJwt.voidsetClaimSetConverter(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 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 Detail
-
NimbusJwtDecoderJwkSupport
public NimbusJwtDecoderJwkSupport(java.lang.String jwkSetUrl)
Deprecated.Constructs aNimbusJwtDecoderJwkSupportusing the provided parameters.- Parameters:
jwkSetUrl- the JSON Web Key (JWK) SetURL
-
NimbusJwtDecoderJwkSupport
public NimbusJwtDecoderJwkSupport(java.lang.String jwkSetUrl, java.lang.String jwsAlgorithm)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 Detail
-
decode
public Jwt decode(java.lang.String token) throws JwtException
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
public void setJwtValidator(OAuth2TokenValidator<Jwt> jwtValidator)
Deprecated.Use thisJwtValidator- 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 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
-
-