|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.errai.security.shared.api.UserCookieEncoder
public class UserCookieEncoder
Encodes and decodes User
objects persisted in Errai Security cookies.
Field Summary | |
---|---|
static String |
USER_COOKIE_NAME
The cookie name for the Errai Security cookie. |
Constructor Summary | |
---|---|
UserCookieEncoder()
|
Method Summary | |
---|---|
static User |
fromCookieValue(String userString)
Decode a persisted User from a cookie value. |
static String |
toCookieValue(User user)
Encode a cookie value used for persisting a User . |
static String |
unquoteIfNeeded(String s)
Unquotes a cookie value if it has been quoted and escaped by the Jetty web server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String USER_COOKIE_NAME
Constructor Detail |
---|
public UserCookieEncoder()
Method Detail |
---|
public static String toCookieValue(User user)
User
.
user
- The user to be persisted.
User
that can be decoded by
fromCookieValue(String)
.User
,
USER_COOKIE_NAME
,
fromCookieValue(String)
public static User fromCookieValue(String userString)
User
from a cookie value.
userString
- A cookie value that has been persisted using
toCookieValue(User)
.
User
object persisted in the given cookie value.User
,
USER_COOKIE_NAME
,
toCookieValue(User)
public static String unquoteIfNeeded(String s)
This method is based on (originally copied from) the org.mortbay.util.QuotedStringTokenizer.unquote method from Jetty 6.1.25.
s
- the cookie value that may or may not be quoted.
|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |