Package org.opencastproject.security.jwt
Class CachedJWT
- java.lang.Object
-
- org.opencastproject.security.jwt.CachedJWT
-
public class CachedJWT extends Object
Class used for caching JWTs.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DategetExpiresAt()Getter for the expiry date.StringgetSignature()Getter for the signature.StringgetUsername()Getter for the username.booleanhasExpired()Returnstrueif the cached JWT expired, false otherwise.
-
-
-
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()
Returnstrueif 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.
-
-