|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.seraph.util.CookieUtils
CookieHandler, CookieEncoder or CookieDecoder instead.
public class CookieUtils
Seraph utility class for dealing with cookies.
Includes code from Jive 1.2.4 (released under the Apache license)
| Field Summary | |
|---|---|
static java.lang.String |
COOKIES_TO_SEND
Deprecated. |
| Constructor Summary | |
|---|---|
CookieUtils()
Deprecated. |
|
| Method Summary | |
|---|---|
static java.lang.String[] |
decodePasswordCookie(java.lang.String cookieVal)
Deprecated. Since 0.10, use CookieEncoder instead |
static java.lang.String[] |
decodePasswordCookie(java.lang.String cookieVal,
java.lang.String encoding)
Deprecated. Since 0.10, use CookieEncoder instead |
static java.lang.String |
encodePasswordCookie(java.lang.String username,
java.lang.String password)
Deprecated. Since 0.10, use CookieEncoder instead |
static java.lang.String |
encodePasswordCookie(java.lang.String username,
java.lang.String password,
java.lang.String encoding)
Deprecated. Since 0.10, use CookieEncoder instead |
static javax.servlet.http.Cookie |
getCookie(javax.servlet.http.HttpServletRequest request,
java.lang.String name)
Deprecated. Since 0.10, use CookieHandler instead |
static java.lang.String |
getCookieValue(javax.servlet.http.HttpServletRequest request,
java.lang.String name)
Deprecated. Since 0.10, use CookieHandler instead |
static void |
invalidateCookie(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String cookieName)
Deprecated. Since 0.10, use CookieHandler instead |
static void |
invalidateCookie(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String cookieName,
java.lang.String path)
Deprecated. Since 0.10, use CookieHandler instead |
static javax.servlet.http.Cookie |
setCookie(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String name,
java.lang.String value,
int maxAge,
java.lang.String path)
Deprecated. Since 0.10, use CookieHandler instead |
| 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 COOKIES_TO_SEND
| Constructor Detail |
|---|
public CookieUtils()
| Method Detail |
|---|
public static void invalidateCookie(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String cookieName,
java.lang.String path)
CookieHandler instead
response - The HttpServletResponse object, known as "response" in a JSP page.cookieName - The name of the cookie you want to delete.path - of the path the cookie you want to delete.
public static void invalidateCookie(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String cookieName)
CookieHandler instead
invalidateCookie(HttpServletRequest, HttpServletResponse, String, String)
response - The HttpServletResponse object, known as "response" in a JSP page.cookieName - The name of the cookie you want to delete.invalidateCookie(HttpServletRequest, HttpServletResponse, String, String)
public static javax.servlet.http.Cookie getCookie(javax.servlet.http.HttpServletRequest request,
java.lang.String name)
CookieHandler instead
request - The HttpServletRequest object, known as "request" in a JSP page.name - the name of the cookie.
public static javax.servlet.http.Cookie setCookie(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String name,
java.lang.String value,
int maxAge,
java.lang.String path)
CookieHandler instead
public static java.lang.String getCookieValue(javax.servlet.http.HttpServletRequest request,
java.lang.String name)
CookieHandler instead
request - the HttpServletRequest object, known as "request" in a JSP page.name - the name of the cookie
public static java.lang.String encodePasswordCookie(java.lang.String username,
java.lang.String password)
CookieEncoder instead
Note: with open source this is not really secure, but it prevents users from snooping the cookie file of others and by changing the XOR mask and character offsets, you can easily tweak results.
username - The username.password - The password.
null.
public static java.lang.String encodePasswordCookie(java.lang.String username,
java.lang.String password,
java.lang.String encoding)
CookieEncoder instead
Note: with open source this is not really secure, but it prevents users from snooping the cookie file of others and by changing the XOR mask and character offsets, you can easily tweak results.
username - The username.password - The password.encoding - A String used to customise cookie encoding (only the first 3 characters are used)
null.public static java.lang.String[] decodePasswordCookie(java.lang.String cookieVal)
CookieEncoder instead
cookieVal - The cookie value.
{ null, null } if cookieVal equals
null or the empty string.
public static java.lang.String[] decodePasswordCookie(java.lang.String cookieVal,
java.lang.String encoding)
CookieEncoder instead
cookieVal - The cookie value.encoding - A String used to customise cookie encoding (only the first 3 characters are used) - should be the same string you used to encode the
cookie!
{ null, null } if cookieVal equals
null or the empty string.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||