java.lang.Object | |
↳ | com.microstrategy.utils.JsonWebTokenUtils |
Class with helper methods to create JWT token and validate it
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | DEFAULT_ALGORITHM | ||||||||||
String | PROPERTY_ALGORITHM | ||||||||||
String | PROPERTY_SECRET_KEY | ||||||||||
String | PROPERTY_TIME_TO_LIVE |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
JsonWebTokenUtils() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static String | decryptString(String str) | ||||||||||
static String | encryptString(String str) | ||||||||||
static String |
generateToken(JsonWebTokenPayLoad payload)
Generate JWT Token with the supplied payload @return
| ||||||||||
static boolean |
isValidToken(String compactJws)
Validates if token signature is valid and not expired@return
| ||||||||||
static void | setAlgorithm(String algorithm) | ||||||||||
static void | setKey(char[] key) | ||||||||||
static void | setTokenTTL(int tokenTTL) | ||||||||||
static JsonWebTokenPayLoad |
validateToken(String compactJws)
@return
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Generate JWT Token with the supplied payload @return
WebUtilsException |
---|
Validates if token signature is valid and not expired@return
WebUtilsException |
---|
@return
WebUtilsException | Validates if token signature is valid and not expired |
---|---|
ExpiredJwtException | |
SignatureException |