Class SupplierJwtDecoder
- java.lang.Object
-
- org.springframework.security.oauth2.jwt.SupplierJwtDecoder
-
- All Implemented Interfaces:
JwtDecoder
public final class SupplierJwtDecoder extends java.lang.Object implements JwtDecoder
AJwtDecoder
that lazily initializes anotherJwtDecoder
- Since:
- 5.6
-
-
Constructor Summary
Constructors Constructor Description SupplierJwtDecoder(java.util.function.Supplier<JwtDecoder> jwtDecoderSupplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Jwt
decode(java.lang.String token)
Decodes the JWT from it's compact claims representation format and returns aJwt
.
-
-
-
Constructor Detail
-
SupplierJwtDecoder
public SupplierJwtDecoder(java.util.function.Supplier<JwtDecoder> jwtDecoderSupplier)
-
-
Method Detail
-
decode
public Jwt decode(java.lang.String token) throws JwtException
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
-
-