public class CookieManager extends GenericService implements ProfileRequestConstants
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
SERVICE_INFO_KEYPROFILE_PARAMETER_NAME, PROFILE_VERFICATION_PARAMETER_NAMEDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description |
|---|
CookieManager()
Constructs an instanceof CookieManager
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
cookieProfileIdValid(java.lang.String pProfileId,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Returns true if the supplied profile id is valid, based on the
verification cookie.
|
void |
expireProfileCookies(Profile pProfile,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Sends cookie out on the request to expire any existing profile cookies
|
java.lang.String |
extractProfileId(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Attempts to extract the profile id out of the cookies
|
void |
forceProfileCookies(Profile pProfile,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Forces the response to contain new profile cookies.
|
protected java.lang.String |
generateIdChecksum(java.lang.String pId)
Returns a checksum of the given Id which can be used
to determine if the profile id cookie has been
tampered with
|
atg.userprofiling.HashInitializer |
getCookieHashInitializer() |
java.lang.String |
getCookieHashKey()
Returns property CookieHashKey
|
java.lang.String |
getProfileCookieComment()
Returns property ProfileCookieComment
|
java.lang.String |
getProfileCookieDomain()
Returns property ProfileCookieDomain
|
int |
getProfileCookieMaxAge()
Returns property ProfileCookieMaxAge
|
java.lang.String |
getProfileCookiePath()
Returns property ProfileCookiePath
|
boolean |
isExpireProfileCookiesOnLogout()
Returns property ExpireProfileCookiesOnLogout
|
boolean |
isProfileCookieSecure()
Returns property ProfileCookieSecure
|
boolean |
isSendProfileCookies()
Returns property SendProfileCookies
|
void |
sendProfileCookies(Profile pProfile,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Sends the specified profile id as a cookie.
|
void |
setCookieHashInitializer(atg.userprofiling.HashInitializer mCookieHashInitializer) |
void |
setCookieHashKey(java.lang.String pCookieHashKey)
Sets property CookieHashKey
|
void |
setExpireProfileCookiesOnLogout(boolean pExpireProfileCookiesOnLogout)
Sets property ExpireProfileCookiesOnLogout
|
void |
setProfileCookieComment(java.lang.String pProfileCookieComment)
Sets property ProfileCookieComment
|
void |
setProfileCookieDomain(java.lang.String pProfileCookieDomain)
Sets property ProfileCookieDomain
|
void |
setProfileCookieMaxAge(int pProfileCookieMaxAge)
Sets property ProfileCookieMaxAge
|
void |
setProfileCookiePath(java.lang.String pProfileCookiePath)
Sets property ProfileCookiePath
|
void |
setProfileCookieSecure(boolean pProfileCookieSecure)
Sets property ProfileCookieSecure
|
void |
setSendProfileCookies(boolean pSendProfileCookies)
Sets property SendProfileCookies
|
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic void setSendProfileCookies(boolean pSendProfileCookies)
public boolean isSendProfileCookies()
public void setProfileCookieComment(java.lang.String pProfileCookieComment)
public java.lang.String getProfileCookieComment()
public atg.userprofiling.HashInitializer getCookieHashInitializer()
public void setCookieHashInitializer(atg.userprofiling.HashInitializer mCookieHashInitializer)
public void setProfileCookieDomain(java.lang.String pProfileCookieDomain)
public java.lang.String getProfileCookieDomain()
public void setProfileCookieMaxAge(int pProfileCookieMaxAge)
public int getProfileCookieMaxAge()
public void setProfileCookiePath(java.lang.String pProfileCookiePath)
public java.lang.String getProfileCookiePath()
public void setProfileCookieSecure(boolean pProfileCookieSecure)
public boolean isProfileCookieSecure()
public void setCookieHashKey(java.lang.String pCookieHashKey)
public java.lang.String getCookieHashKey()
public void setExpireProfileCookiesOnLogout(boolean pExpireProfileCookiesOnLogout)
public boolean isExpireProfileCookiesOnLogout()
public java.lang.String extractProfileId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletExceptionjava.io.IOExceptionpublic boolean cookieProfileIdValid(java.lang.String pProfileId,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
javax.servlet.ServletExceptionjava.io.IOExceptionpublic void sendProfileCookies(Profile pProfile, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException - if there was a problem performing the
operationjava.io.IOException - if there was a problem performing the
operationpublic void forceProfileCookies(Profile pProfile, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException - if there was a problem performing the
operationjava.io.IOException - if there was a problem performing the
operationpublic void expireProfileCookies(Profile pProfile, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException - if there was a problem performing the
operationjava.io.IOException - if there was a problem performing the
operationprotected java.lang.String generateIdChecksum(java.lang.String pId)