Package play.core.cookie.encoding
Class ClientCookieEncoder
java.lang.Object
play.core.cookie.encoding.ClientCookieEncoder
A RFC6265 compliant cookie encoder to be used
client side, so only name=value pairs are sent.
Note that multiple cookies are supposed to be sent at once in a single "Cookie" header.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ClientCookieEncoderLax instance that doesn't validate name and valuestatic final ClientCookieEncoderStrict encoder that validates that name and value chars are in the valid scope defined in RFC6265 -
Method Summary
Modifier and TypeMethodDescriptionEncodes the specified cookies into a single Cookie header value.Encodes the specified cookie into a Cookie header value.Encodes the specified cookie into a Cookie header value.Encodes the specified cookies into a single Cookie header value.protected voidvalidateCookie(String name, String value)
-
Field Details
-
STRICT
Strict encoder that validates that name and value chars are in the valid scope defined in RFC6265 -
LAX
Lax instance that doesn't validate name and value
-
-
Method Details
-
encode
Encodes the specified cookie into a Cookie header value.- Parameters:
name- the cookie namevalue- the cookie value- Returns:
- a Rfc6265 style Cookie header value
-
encode
Encodes the specified cookie into a Cookie header value.- Parameters:
cookie- specified the cookie- Returns:
- a Rfc6265 style Cookie header value
-
encode
Encodes the specified cookies into a single Cookie header value.- Parameters:
cookies- some cookies- Returns:
- a Rfc6265 style Cookie header value, null if no cookies are passed.
-
encode
Encodes the specified cookies into a single Cookie header value.- Parameters:
cookies- some cookies- Returns:
- a Rfc6265 style Cookie header value, null if no cookies are passed.
-
validateCookie
-