/** * Don't log the cookie's value; that's potentially sensitive information. */ private String cookieToString(Cookie cookie) { return cookie.getClass().getSimpleName() + "[version=" + cookie.getVersion() + ",name=" + cookie.getName() + ",domain=" + cookie.getDomain() + ",path=" + cookie.getPath() + ",expiry=" + cookie.getExpiryDate() + "]"; } // END android-added
line.append(cookie.isSecure() ? "TRUE" : "FALSE"); line.append(tab); line.append(cookie.getExpiryDate() != null ? cookie.getExpiryDate().getTime() / 1000 : -1); line.append(tab); line.append(cookie.getName());
@Override public Date getExpires() { return cookie.getExpiryDate(); } }
@Override public Date getExpiryDate() { return delegate.getExpiryDate(); }
@Override public Date getExpiryDate() { return delegate.getExpiryDate(); }
public Date getExpiryDate() { return cookie.getExpiryDate(); }
public boolean clearExpired(Date date) { for (int i = m_Cookies.size() - 1; i >= 0; i--) { if (m_Cookies.get(i).getExpiryDate() != null && date != null && date.after(m_Cookies.get(i).getExpiryDate())) { m_Cookies.remove(i); break; } } return true; //To change body of implemented methods use File | Settings | File Templates. }
@Override public boolean clearExpired(Date date) { final Iterator<Cookie> ci = cookies.iterator(); while(ci.hasNext()){ final Cookie cookie = ci.next(); if(date.equals(cookie.getExpiryDate())){ ci.remove(); return true; } } return false; }
private void writeObject(ObjectOutputStream out) throws IOException { out.writeObject(cookie.getName()); out.writeObject(cookie.getValue()); out.writeObject(cookie.getComment()); out.writeObject(cookie.getDomain()); out.writeObject(cookie.getExpiryDate()); out.writeObject(cookie.getPath()); out.writeInt(cookie.getVersion()); out.writeBoolean(cookie.isSecure()); }
private void writeObject(ObjectOutputStream out) throws IOException { out.writeObject(cookie.getName()); out.writeObject(cookie.getValue()); out.writeObject(cookie.getComment()); out.writeObject(cookie.getDomain()); out.writeObject(cookie.getExpiryDate()); out.writeObject(cookie.getPath()); out.writeInt(cookie.getVersion()); out.writeBoolean(cookie.isSecure()); }
private Map<String, Object> toMap(final Sid sid, final Cookie cookie) { final Map<String, Object> map = new HashMap<String, Object>(); map.put("sid", DaoUtils.writeSid(sid)); map.put("comment", cookie.getComment()); map.put("domain", cookie.getDomain()); map.put("expiration_date", cookie.getExpiryDate()); map.put("name", cookie.getName()); map.put("path", cookie.getPath()); map.put("value", cookie.getValue()); map.put("version", cookie.getVersion()); return map; } }
private void writeObject(ObjectOutputStream out) throws IOException { out.writeObject(cookie.getName()); out.writeObject(cookie.getValue()); out.writeObject(cookie.getComment()); out.writeObject(cookie.getDomain()); out.writeObject(cookie.getExpiryDate()); out.writeObject(cookie.getPath()); out.writeInt(cookie.getVersion()); out.writeBoolean(cookie.isSecure()); }
/** * Don't log the cookie's value; that's potentially sensitive information. */ private String cookieToString(Cookie cookie) { return cookie.getClass().getSimpleName() + "[version=" + cookie.getVersion() + ",name=" + cookie.getName() + ",domain=" + cookie.getDomain() + ",path=" + cookie.getPath() + ",expiry=" + cookie.getExpiryDate() + "]"; } // END android-added
/** * Don't log the cookie's value; that's potentially sensitive information. */ private String cookieToString(Cookie cookie) { return cookie.getClass().getSimpleName() + "[version=" + cookie.getVersion() + ",name=" + cookie.getName() + ",domain=" + cookie.getDomain() + ",path=" + cookie.getPath() + ",expiry=" + cookie.getExpiryDate() + "]"; } // END android-added
/** * Don't log the cookie's value; that's potentially sensitive information. */ private String cookieToString(Cookie cookie) { return cookie.getClass().getSimpleName() + "[version=" + cookie.getVersion() + ",name=" + cookie.getName() + ",domain=" + cookie.getDomain() + ",path=" + cookie.getPath() + ",expiry=" + cookie.getExpiryDate() + "]"; } // END android-added
/** * Don't log the cookie's value; that's potentially sensitive information. */ private String cookieToString(Cookie cookie) { return cookie.getClass().getSimpleName() + "[version=" + cookie.getVersion() + ",name=" + cookie.getName() + ",domain=" + cookie.getDomain() + ",path=" + cookie.getPath() + ",expiry=" + cookie.getExpiryDate() + "]"; } // END android-added
private Cookie findAuthenticationCookie(List<org.apache.http.cookie.Cookie> cookies) { for (org.apache.http.cookie.Cookie cookie : cookies) { if (properties.getProperty(ConfigKeys.LOGIN_TOKEN, DEFAULT_LOGIN_TOKEN) .equals(cookie.getName())) { return new Cookie(cookie.getName(), cookie.getValue(), cookie.getDomain(), cookie.getPath(), cookie.getExpiryDate()); } } return null; } }
private Cookie findAuthenticationCookie(List<org.apache.http.cookie.Cookie> cookies) { for (org.apache.http.cookie.Cookie cookie : cookies) { if (properties.getProperty(ConfigKeys.LOGIN_TOKEN, DEFAULT_LOGIN_TOKEN) .equals(cookie.getName())) { return new Cookie(cookie.getName(), cookie.getValue(), cookie.getDomain(), cookie.getPath(), cookie.getExpiryDate()); } } return null; } }
Cookie(org.apache.http.cookie.Cookie cookie) { this.name = cookie.getName(); this.value = cookie.getValue(); this.expires = cookie.getExpiryDate(); this.path = cookie.getPath(); this.domain = cookie.getDomain(); this.httpOnly = false; this.secure = cookie.isSecure(); }
private static Cookie convert(org.apache.http.cookie.Cookie in) { return new Cookie(in.getName(), in.getValue(), in.getDomain(), in.getPath(), in.getExpiryDate(), in.isSecure()); }