Class SecurityCookieData
java.lang.Object
org.deltava.security.SecurityCookieData
- All Implemented Interfaces:
Serializable
A bean containing data stored in the security cookie.
- Since:
- 1.0
- Version:
- 10.1
- Author:
- Luke
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSecurityCookieData
(String userID) Creates security cookie data for a given user ID. -
Method Summary
Modifier and TypeMethodDescriptionReturns the expiration date of the cookie.Returns the login date.Returns the remote address of the user.Returns the encrypted cookie signature algorithm name.Retrieves the user ID from this security cookie.int
hashCode()
boolean
Checks if the security cookie has expired.void
setExpiryDate
(Instant dt) Sets the expiry date of the security cookie.void
setLoginDate
(Instant dt) Sets the login date.void
setRemoteAddr
(String remoteAddr) Updates the user's IP address.void
Updates the signature algorithm for the encrypted cookie.toString()
-
Constructor Details
-
SecurityCookieData
Creates security cookie data for a given user ID.- Parameters:
userID
- the user ID
-
-
Method Details
-
getExpiryDate
Returns the expiration date of the cookie.- Returns:
- the expiration date
-
getLoginDate
-
getUserID
Retrieves the user ID from this security cookie.- Returns:
- the Directory Name of the user
-
getRemoteAddr
-
getSignatureAlgorithm
Returns the encrypted cookie signature algorithm name.- Returns:
- the algorithm name
-
isExpired
public boolean isExpired()Checks if the security cookie has expired.- Returns:
- TRUE if the cookie has expired, otherwise FALSE
-
setExpiryDate
Sets the expiry date of the security cookie.- Parameters:
dt
- the expiration date
-
setLoginDate
-
setRemoteAddr
Updates the user's IP address.- Parameters:
remoteAddr
- the IP address
-
setSignatureAlgorithm
Updates the signature algorithm for the encrypted cookie.- Parameters:
alg
- the algorithm name
-
hashCode
-
toString
-