com.k2.shiro.K2Session Maven / Gradle / Ivy
The newest version!
/* vim: set et ts=2 sw=2 cindent fo=qroca: */
package com.k2.shiro;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.shiro.web.servlet.SimpleCookie;
import org.apache.shiro.session.InvalidSessionException;
import org.apache.shiro.session.mgt.ValidatingSession;
/** A shiro session that keeps its information in a cookie.
*/
public class K2Session implements ValidatingSession {
/** The class logger. */
private final Logger log = LoggerFactory.getLogger(K2Session.class);
/** The cipher to use to encrypt session cookies, never null. */
private K2Cipher cipher;
/** The servlet request, never null.
*/
private HttpServletRequest request;
/** The servlet response, never null.
*/
private HttpServletResponse response;
/**The host that originated the request, never null.
*/
private String host;
/** The session attributes, never null.
*/
private HashMap
© 2015 - 2024 Weber Informatics LLC | Privacy Policy