Class AuthenticationCookieManager
java.lang.Object
com.jalios.jcms.authentication.cookie.AuthenticationCookieManager
Provides utility methods to manage AuthenticationCookie.
- Since:
- JCMS-5813
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final AuthenticationCookiecreateAuthenticationCookie(Member member, String digest, Date expirationDate) Create a new AuthenticationCookie in the db for the specified informationstatic voiddeleteAuthenticationCookie(Member member, String digest) Delete AuthenticationCookie matching specified parameter.static voidDelete all AuthenticationCookie whose expiration date is prior to now.static final AuthenticationCookiegetAuthenticationCookie(Member member, String digest) Retrieve the AuthenticationCookie stored in DB and matching the specified criteria
-
Constructor Details
-
AuthenticationCookieManager
public AuthenticationCookieManager()
-
-
Method Details
-
createAuthenticationCookie
public static final AuthenticationCookie createAuthenticationCookie(Member member, String digest, Date expirationDate) Create a new AuthenticationCookie in the db for the specified information- Parameters:
member- the member for which AuthenticationCookie is createddigest- the cookie digest that was computedexpirationDate- a Date after which the CookieAuthentication can be deleted/purged.- Returns:
- a new AuthenticationCookie instance
-
getAuthenticationCookie
Retrieve the AuthenticationCookie stored in DB and matching the specified criteria- Parameters:
member- the Member for which the cookie has been emitteddigest- the digest of the cookie- Returns:
- an AuthenticationCookie or null
-
deleteAuthenticationCookie
Delete AuthenticationCookie matching specified parameter.Parameters are all required, no operation is performed if any of them are null or empty.
- Parameters:
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.
-