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
RememberMeManager
autoLogin
in interface RememberMeManager
context
- the request contextRememberMeException
public void enableRememberMe(Authentication authentication, org.craftercms.commons.http.RequestContext context) throws RememberMeException
RememberMeManager
enableRememberMe
in interface RememberMeManager
authentication
- the authentication objectcontext
- the request contextRememberMeException
public void disableRememberMe(org.craftercms.commons.http.RequestContext context) throws RememberMeException
RememberMeManager
disableRememberMe
in interface RememberMeManager
context
- the request contextRememberMeException
protected void disableRememberMe(String loginId, org.craftercms.commons.http.RequestContext context) throws RememberMeException
RememberMeException
protected void updateRememberMe(String loginId, org.craftercms.commons.http.RequestContext context) throws RememberMeException
RememberMeException
protected String serializeLogin(PersistentLogin login) throws RememberMeException
RememberMeException
protected PersistentLogin deserializeLogin(String serializedLogin) throws RememberMeException
RememberMeException
protected 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
AuthenticationException
Copyright © 2023 CrafterCMS. All rights reserved.