public class CmsPersistentLoginAuthorizationHandler extends CmsDefaultAuthorizationHandler
The cookie contains a user's name and a key. It will only log that user in if there is a key matching the key from the cookie in the user's additional info map, and if additional info value, when interpreted as a time, is greater than the current time returned by System.currentTimeMillis().
I_CmsAuthorizationHandler.I_PrivilegedLoginAction| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COOKIE_NAME
The name of the cookie.
|
AUTHORIZATION_BASIC_PREFIX, HEADER_AUTHORIZATION, SEPARATOR_CREDENTIALSm_parameters| Constructor and Description |
|---|
CmsPersistentLoginAuthorizationHandler() |
| Modifier and Type | Method and Description |
|---|---|
CmsObject |
initCmsObject(javax.servlet.http.HttpServletRequest request,
I_CmsAuthorizationHandler.I_PrivilegedLoginAction loginAction)
Creates a new cms object from the given request object.
|
CmsObject |
initCmsObjectFromToken(javax.servlet.http.HttpServletRequest request,
I_CmsAuthorizationHandler.I_PrivilegedLoginAction loginAction)
Tries to initialize the CmsObject from a login token given as a cookie in the request.
|
checkBasicAuthorization, getLoginFormURL, initCmsObject, initCmsObject, requestAuthorizationinitCmsObjectFromSession, registerSession, setParameterspublic static final java.lang.String COOKIE_NAME
public CmsPersistentLoginAuthorizationHandler()
public CmsObject initCmsObject(javax.servlet.http.HttpServletRequest request, I_CmsAuthorizationHandler.I_PrivilegedLoginAction loginAction)
I_CmsAuthorizationHandlerThis method is called by OpenCms every time a resource is requested and the session can not automatically be authenticated.
initCmsObject in interface I_CmsAuthorizationHandlerinitCmsObject in class CmsDefaultAuthorizationHandlerrequest - the HTTP request to authenticateloginAction - the privileged login actionCmsDefaultAuthorizationHandler.initCmsObject(javax.servlet.http.HttpServletRequest, org.opencms.security.I_CmsAuthorizationHandler.I_PrivilegedLoginAction)public CmsObject initCmsObjectFromToken(javax.servlet.http.HttpServletRequest request, I_CmsAuthorizationHandler.I_PrivilegedLoginAction loginAction)
request - the requestloginAction - the privileged login action