Class JwtUtils


  • public class JwtUtils
    extends java.lang.Object
    Utility 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.Long extractExpirationTime​(java.lang.String jsonWebToken)
      Extracts expiration time from the specified JWT token.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JwtUtils

        public JwtUtils()
    • 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.