Package io.pravega.common.security
Class JwtUtils
- java.lang.Object
-
- io.pravega.common.security.JwtUtils
-
public class JwtUtils extends java.lang.ObjectUtility methods for JSON Web Tokens (JWT).
-
-
Constructor Summary
Constructors Constructor Description JwtUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.LongextractExpirationTime(java.lang.String jsonWebToken)Extracts expiration time from the specified JWT token.
-
-
-
Method Detail
-
extractExpirationTime
public static java.lang.Long extractExpirationTime(java.lang.String jsonWebToken)
Extracts expiration time from the specified JWT token.- Parameters:
jsonWebToken- the JWT to extract the expiration time from- Returns:
- the the expiration time (in seconds). Returns null if a) the specified token is blank, or b) the specified token is of invalid format, or c) expiration time is missing from the token, or d) expiration time is not a number.
-
-