Class CachedJWT


  • public class CachedJWT
    extends Object
    Class used for caching JWTs.
    • Constructor Detail

      • CachedJWT

        public CachedJWT​(com.auth0.jwt.interfaces.DecodedJWT jwt,
                         String username)
        Creates a cached JWT form a decoded JWT and a username.
        Parameters:
        jwt - The decoded JWT.
        username - The username extracted from the JWT.
    • Method Detail

      • hasExpired

        public boolean hasExpired()
        Returns true if the cached JWT expired, false otherwise.
        Returns:
        Boolean indicating whether the cached JWT has expired.
      • getSignature

        public String getSignature()
        Getter for the signature.
        Returns:
        The signature.
      • getExpiresAt

        public Date getExpiresAt()
        Getter for the expiry date.
        Returns:
        The expiry date.
      • getUsername

        public String getUsername()
        Getter for the username.
        Returns:
        The username.