public class RememberMeManagerImpl extends Object implements RememberMeManager
RememberMeManager.| Modifier and Type | Field and Description |
|---|---|
protected AuthenticationManager |
authenticationManager |
protected AuthenticationService |
authenticationService |
protected org.craftercms.commons.crypto.TextEncryptor |
encryptor |
protected ProfileService |
profileService |
static String |
REMEMBER_ME_COOKIE_NAME |
protected org.craftercms.commons.http.CookieManager |
rememberMeCookieManager |
static char |
SERIALIZED_LOGIN_SEPARATOR |
| Constructor and Description |
|---|
RememberMeManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addRememberMeCookie(String cookieValue,
javax.servlet.http.HttpServletResponse response) |
protected Authentication |
authenticate(String profileId) |
Authentication |
autoLogin(org.craftercms.commons.http.RequestContext context)
Attempts auto login if a remember me cookie is present in the current request
|
protected void |
deleteRememberMeCookie(javax.servlet.http.HttpServletResponse response) |
protected PersistentLogin |
deserializeLogin(String serializedLogin) |
void |
disableRememberMe(org.craftercms.commons.http.RequestContext context)
Disabled remember me for the current authenticated profile, generally by removing remember me cookie.
|
protected void |
disableRememberMe(String loginId,
org.craftercms.commons.http.RequestContext context) |
void |
enableRememberMe(Authentication authentication,
org.craftercms.commons.http.RequestContext context)
Enables remember me for the current authenticated profile, generally by adding a remember me cookie.
|
protected PersistentLogin |
getPersistentLoginFromCookie(javax.servlet.http.HttpServletRequest request) |
protected String |
getRememberMeCookie(javax.servlet.http.HttpServletRequest request) |
protected String |
serializeLogin(PersistentLogin login) |
void |
setAuthenticationManager(AuthenticationManager authenticationManager) |
void |
setAuthenticationService(AuthenticationService authenticationService) |
void |
setEncryptor(org.craftercms.commons.crypto.TextEncryptor encryptor) |
void |
setProfileService(ProfileService profileService) |
void |
setRememberMeCookieManager(org.craftercms.commons.http.CookieManager rememberMeCookieManager) |
protected void |
updateRememberMe(String loginId,
org.craftercms.commons.http.RequestContext context) |
public static final String REMEMBER_ME_COOKIE_NAME
public static final char SERIALIZED_LOGIN_SEPARATOR
protected AuthenticationService authenticationService
protected AuthenticationManager authenticationManager
protected ProfileService profileService
protected org.craftercms.commons.crypto.TextEncryptor encryptor
protected org.craftercms.commons.http.CookieManager rememberMeCookieManager
public void setAuthenticationService(AuthenticationService authenticationService)
public void setAuthenticationManager(AuthenticationManager authenticationManager)
public void setProfileService(ProfileService profileService)
public void setEncryptor(org.craftercms.commons.crypto.TextEncryptor encryptor)
public void setRememberMeCookieManager(org.craftercms.commons.http.CookieManager rememberMeCookieManager)
public Authentication autoLogin(org.craftercms.commons.http.RequestContext context) throws RememberMeException
RememberMeManagerautoLogin in interface RememberMeManagercontext - the request contextRememberMeExceptionpublic void enableRememberMe(Authentication authentication, org.craftercms.commons.http.RequestContext context) throws RememberMeException
RememberMeManagerenableRememberMe in interface RememberMeManagerauthentication - the authentication objectcontext - the request contextRememberMeExceptionpublic void disableRememberMe(org.craftercms.commons.http.RequestContext context)
throws RememberMeException
RememberMeManagerdisableRememberMe in interface RememberMeManagercontext - the request contextRememberMeExceptionprotected void disableRememberMe(String loginId, org.craftercms.commons.http.RequestContext context) throws RememberMeException
RememberMeExceptionprotected void updateRememberMe(String loginId, org.craftercms.commons.http.RequestContext context) throws RememberMeException
RememberMeExceptionprotected String serializeLogin(PersistentLogin login) throws RememberMeException
RememberMeExceptionprotected PersistentLogin deserializeLogin(String serializedLogin) throws RememberMeException
RememberMeExceptionprotected void addRememberMeCookie(String cookieValue, javax.servlet.http.HttpServletResponse response)
protected String getRememberMeCookie(javax.servlet.http.HttpServletRequest request)
protected void deleteRememberMeCookie(javax.servlet.http.HttpServletResponse response)
protected PersistentLogin getPersistentLoginFromCookie(javax.servlet.http.HttpServletRequest request)
protected Authentication authenticate(String profileId) throws AuthenticationException
AuthenticationExceptionCopyright © 2023 CrafterCMS. All rights reserved.