Search in sources :

Example 11 with SimpleCookie

use of org.apache.shiro.web.servlet.SimpleCookie in project nutzboot by nutzam.

the class ShiroEnvStarter method createRememberMeManager.

@IocBean(name = "shiroRememberMeManager")
public RememberMeManager createRememberMeManager() {
    CookieRememberMeManager rememberMeManager = new CookieRememberMeManager();
    rememberMeManager.setSerializer(new SimplePrincipalSerializer());
    SimpleCookie cookie = new SimpleCookie();
    cookie.setName("rememberMe");
    cookie.setHttpOnly(true);
    rememberMeManager.setCookie(cookie);
    return rememberMeManager;
}
Also used : SimpleCookie(org.apache.shiro.web.servlet.SimpleCookie) SimplePrincipalSerializer(org.nutz.integration.shiro.SimplePrincipalSerializer) CookieRememberMeManager(org.apache.shiro.web.mgt.CookieRememberMeManager) IocBean(org.nutz.ioc.loader.annotation.IocBean)

Aggregations

SimpleCookie (org.apache.shiro.web.servlet.SimpleCookie)11 Cookie (org.apache.shiro.web.servlet.Cookie)5 ShiroFilterFactoryBean (org.apache.shiro.spring.web.ShiroFilterFactoryBean)3 Bean (org.springframework.context.annotation.Bean)3 DefaultWebSessionManager (org.apache.shiro.web.session.mgt.DefaultWebSessionManager)2 IocBean (org.nutz.ioc.loader.annotation.IocBean)2 MethodInvokingFactoryBean (org.springframework.beans.factory.config.MethodInvokingFactoryBean)2 EhCacheManagerFactoryBean (org.springframework.cache.ehcache.EhCacheManagerFactoryBean)2 HttpServletRequest (javax.servlet.http.HttpServletRequest)1 HttpServletResponse (javax.servlet.http.HttpServletResponse)1 CacheManager (org.apache.shiro.cache.CacheManager)1 MemoryConstrainedCacheManager (org.apache.shiro.cache.MemoryConstrainedCacheManager)1 EhCacheManager (org.apache.shiro.cache.ehcache.EhCacheManager)1 EnterpriseCacheSessionDAO (org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO)1 CookieRememberMeManager (org.apache.shiro.web.mgt.CookieRememberMeManager)1 ShiroHttpServletRequest (org.apache.shiro.web.servlet.ShiroHttpServletRequest)1 SimplePrincipalSerializer (org.nutz.integration.shiro.SimplePrincipalSerializer)1 UU32SessionIdGenerator (org.nutz.integration.shiro.UU32SessionIdGenerator)1 LCacheManager (org.nutz.plugins.cache.impl.lcache.LCacheManager)1 RedisCacheManager (org.nutz.plugins.cache.impl.redis.RedisCacheManager)1