List of usage examples for io.netty.handler.codec.http Cookie setValue
void setValue(String value);
From source file:com.titilink.camel.rest.common.AdapterRestletUtil.java
License:LGPL
/** * ?Cookie// ww w . j a v a2 s .c o m * * @param cookie * @return */ public static org.restlet.data.Cookie parseToRestletCookie(Cookie cookie) { if (null == cookie) { LOGGER.error("cookie=null"); return null; } org.restlet.data.Cookie restletCookie = new org.restlet.data.Cookie(); restletCookie.setDomain(cookie.getDomain()); restletCookie.setVersion(cookie.getVersion()); restletCookie.setName(cookie.getName()); restletCookie.setValue(cookie.getValue()); restletCookie.setPath(cookie.getPath()); return restletCookie; }
From source file:fr.wseduc.webutils.request.CookieHelper.java
License:Apache License
private void signCookie(Cookie cookie) throws InvalidKeyException, NoSuchAlgorithmException, IllegalStateException, UnsupportedEncodingException { String signature = HmacSha1//w w w.j a v a2s . c o m .sign(cookie.getDomain() + cookie.getName() + cookie.getPath() + cookie.getValue(), signKey); cookie.setValue(cookie.getValue() + ":" + signature); }