public class CookieDataCodec extends Object
Modifier and Type | Field and Description |
---|---|
static Pattern |
oldCookieSessionParser
Cookie session parser for cookie created by version 1.2.5 or before.
|
Constructor and Description |
---|
CookieDataCodec() |
Modifier and Type | Method and Description |
---|---|
static void |
decode(Map<String,String> map,
String data) |
static String |
encode(Map<String,String> map) |
static boolean |
safeEquals(String a,
String b)
Constant time for same length String comparison, to prevent timing attacks
|
public static Pattern oldCookieSessionParser
We need it to support old Play 1.2.5 session data encoding so that the cookie data doesn't become invalid when applications are upgraded to a newer version of Play
public static void decode(Map<String,String> map, String data) throws UnsupportedEncodingException
map
- the map to decode data into.data
- the data to decode.UnsupportedEncodingException
public static String encode(Map<String,String> map) throws UnsupportedEncodingException
map
- the data to encode.UnsupportedEncodingException
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly