Package org.opencastproject.security.jwt
Class CachedJWT
java.lang.Object
org.opencastproject.security.jwt.CachedJWT
Class used for caching JWTs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGetter for the expiry date.Getter for the signature.Getter for the username.booleanReturnstrueif the cached JWT expired, false otherwise.
-
Constructor Details
-
CachedJWT
Creates a cached JWT form a decoded JWT and a username.- Parameters:
jwt- The decoded JWT.username- The username extracted from the JWT.
-
-
Method Details
-
hasExpired
public boolean hasExpired()Returnstrueif the cached JWT expired, false otherwise.- Returns:
- Boolean indicating whether the cached JWT has expired.
-
getSignature
Getter for the signature.- Returns:
- The signature.
-
getExpiresAt
Getter for the expiry date.- Returns:
- The expiry date.
-
getUsername
Getter for the username.- Returns:
- The username.
-