Class SecurityCookieData

java.lang.Object
org.deltava.security.SecurityCookieData
All Implemented Interfaces:
Serializable

public class SecurityCookieData extends Object implements Serializable
A bean containing data stored in the security cookie.
Since:
1.0
Version:
10.1
Author:
Luke
See Also:
  • Constructor Details

    • SecurityCookieData

      public SecurityCookieData(String userID)
      Creates security cookie data for a given user ID.
      Parameters:
      userID - the user ID
  • Method Details

    • getExpiryDate

      public Instant getExpiryDate()
      Returns the expiration date of the cookie.
      Returns:
      the expiration date
    • getLoginDate

      public Instant getLoginDate()
      Returns the login date.
      Returns:
      the login date
    • getUserID

      public String getUserID()
      Retrieves the user ID from this security cookie.
      Returns:
      the Directory Name of the user
    • getRemoteAddr

      public String getRemoteAddr()
      Returns the remote address of the user.
      Returns:
      the IP address
    • getSignatureAlgorithm

      public String 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

      public void setExpiryDate(Instant dt)
      Sets the expiry date of the security cookie.
      Parameters:
      dt - the expiration date
    • setLoginDate

      public void setLoginDate(Instant dt)
      Sets the login date.
      Parameters:
      dt - the login date
    • setRemoteAddr

      public void setRemoteAddr(String remoteAddr)
      Updates the user's IP address.
      Parameters:
      remoteAddr - the IP address
    • setSignatureAlgorithm

      public void setSignatureAlgorithm(String alg)
      Updates the signature algorithm for the encrypted cookie.
      Parameters:
      alg - the algorithm name
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object