|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jfw.authentication.AuthenticationCookie
public final class AuthenticationCookie
Manage authentication cookie.
| Field Summary | |
|---|---|
static int |
COOKIE_AGE_BROWSER
Cookie is available until the closure of the browser. |
static int |
COOKIE_DELETE
Delete cookie now. |
static java.lang.String |
COOKIE_NAME
Default authentication cookie name. |
static java.lang.String |
COOKIE_SEPARATOR
Separator char for cookie values. |
static int |
DEFAULT_COOKIE_AGE
The default cookie age. |
| Constructor Summary | |
|---|---|
AuthenticationCookie()
|
|
| Method Summary | |
|---|---|
static void |
delete(javax.servlet.http.HttpServletResponse response)
Use method delete(javax.servlet.http.HttpServletResponse, java.lang.String). |
static void |
delete(javax.servlet.http.HttpServletResponse response,
java.lang.String cookieName)
Delete authentication cookie. |
static UserData |
read(javax.servlet.http.HttpServletRequest request)
Use method read(javax.servlet.http.HttpServletRequest, java.lang.String). |
static UserData |
read(javax.servlet.http.HttpServletRequest request,
java.lang.String cookieName)
Read authentication cookie. |
static void |
write(javax.servlet.http.HttpServletResponse response,
UserData userData)
Use method write(javax.servlet.http.HttpServletResponse, com.jfw.authentication.UserData, java.lang.String, java.lang.String, java.lang.String, java.lang.String, int). |
static void |
write(javax.servlet.http.HttpServletResponse response,
UserData userData,
java.lang.String cookieName,
java.lang.String cookieDomain,
java.lang.String cookiePath,
java.lang.String cookieSecure,
int cookieAge)
Write authentication cookie. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String COOKIE_NAME
public static final int COOKIE_AGE_BROWSER
public static int DEFAULT_COOKIE_AGE
COOKIE_AGE_BROWSER.
public static final int COOKIE_DELETE
public static final java.lang.String COOKIE_SEPARATOR
| Constructor Detail |
|---|
public AuthenticationCookie()
| Method Detail |
|---|
public static UserData read(javax.servlet.http.HttpServletRequest request,
java.lang.String cookieName)
request - an HttpServletRequest object.cookieName - cookie name. If null COOKIE_NAME is used.
UserData object or null
if authetication cookie not found.public static UserData read(javax.servlet.http.HttpServletRequest request)
read(javax.servlet.http.HttpServletRequest, java.lang.String). The default value of parameter cookieName
is COOKIE_NAME.
public static void write(javax.servlet.http.HttpServletResponse response,
UserData userData,
java.lang.String cookieName,
java.lang.String cookieDomain,
java.lang.String cookiePath,
java.lang.String cookieSecure,
int cookieAge)
response - an HttpServletResponse object.userData - an UserData object.cookieName - cookie name. If null COOKIE_NAME is used.cookieDomain - cokie domain. If null is not used.cookiePath - cokie path. If null is not used.cookieSecure - cokie secure option. If null is not used.cookieAge - cokie age. A integer value > 0 indicates the msecs before
cookie expire. If value is COOKIE_AGE_BROWSER cookie is not stored
and expire when browser is closed.
public static void write(javax.servlet.http.HttpServletResponse response,
UserData userData)
write(javax.servlet.http.HttpServletResponse, com.jfw.authentication.UserData, java.lang.String, java.lang.String, java.lang.String, java.lang.String, int).COOKIE_NAME.DEFAULT_COOKIE_AGE.
public static void delete(javax.servlet.http.HttpServletResponse response,
java.lang.String cookieName)
response - an HttpServletResponse object.cookieName - cookie name. If null COOKIE_NAME is used.public static void delete(javax.servlet.http.HttpServletResponse response)
delete(javax.servlet.http.HttpServletResponse, java.lang.String).COOKIE_NAME.
response - an HttpServletResponse object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||