|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 String |
COOKIES_TO_SEND
Deprecated. |
Constructor Summary | |
---|---|
CookieUtils()
Deprecated. |
Method Summary | |
---|---|
static String[] |
decodePasswordCookie(String cookieVal)
Deprecated. Since 0.10, use CookieEncoder instead |
static String[] |
decodePasswordCookie(String cookieVal,
String encoding)
Deprecated. Since 0.10, use CookieEncoder instead |
static String |
encodePasswordCookie(String username,
String password)
Deprecated. Since 0.10, use CookieEncoder instead |
static String |
encodePasswordCookie(String username,
String password,
String encoding)
Deprecated. Since 0.10, use CookieEncoder instead |
static javax.servlet.http.Cookie |
getCookie(javax.servlet.http.HttpServletRequest request,
String name)
Deprecated. Since 0.10, use CookieHandler instead |
static String |
getCookieValue(javax.servlet.http.HttpServletRequest request,
String name)
Deprecated. Since 0.10, use CookieHandler instead |
static void |
invalidateCookie(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String cookieName)
Deprecated. Since 0.10, use CookieHandler instead |
static void |
invalidateCookie(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String cookieName,
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,
String name,
String value,
int maxAge,
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 String COOKIES_TO_SEND
Constructor Detail |
---|
public CookieUtils()
Method Detail |
---|
public static void invalidateCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String cookieName, 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, 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, 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, String name, String value, int maxAge, String path)
CookieHandler
instead
public static String getCookieValue(javax.servlet.http.HttpServletRequest request, String name)
CookieHandler
instead
request
- the HttpServletRequest object, known as "request" in a JSP page.name
- the name of the cookie
public static String encodePasswordCookie(String username, 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 String encodePasswordCookie(String username, String password, 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 String[] decodePasswordCookie(String cookieVal)
CookieEncoder
instead
cookieVal
- The cookie value.
{ null, null }
if cookieVal equals
null
or the empty string.public static String[] decodePasswordCookie(String cookieVal, 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 |