Class AuthenticationCookieManager

  • public class AuthenticationCookieManager
    extends java.lang.Object
    Provides utility methods to manage AuthenticationCookie.
    See Also:
    • Constructor Detail

      • AuthenticationCookieManager

        public AuthenticationCookieManager()
    • Method Detail

      • createAuthenticationCookie

        public static final AuthenticationCookie createAuthenticationCookie​(Member member,
                                                                            java.lang.String digest,
                                                                            java.util.Date expirationDate)
        Create a new AuthenticationCookie in the db for the specified information
        member - the member for which AuthenticationCookie is created
        digest - the cookie digest that was computed
        expirationDate - a Date after which the CookieAuthentication can be deleted/purged.
        a new AuthenticationCookie instance
      • getAuthenticationCookie

        public static final AuthenticationCookie getAuthenticationCookie​(Member member,
                                                                         java.lang.String digest)
        Retrieve the AuthenticationCookie stored in DB and matching the specified criteria
        member - the Member for which the cookie has been emitted
        digest - the digest of the cookie
        an AuthenticationCookie or null
      • deleteAuthenticationCookie

        public static void deleteAuthenticationCookie​(Member member,
                                                      java.lang.String digest)
        Delete AuthenticationCookie matching specified parameter.

        Parameters are all required, no operation is performed if any of them are null or empty.

        member - the member for which AuthenticationCookie was emitted.
        digest - the digest of the cookie that was emitted,
      • deleteExpiredAuthenticationCookie

        public static void deleteExpiredAuthenticationCookie()
        Delete all AuthenticationCookie whose expiration date is prior to now.