Search in sources :

Example 1 with SimplePrincipalSerializer

use of org.nutz.integration.shiro.SimplePrincipalSerializer 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

CookieRememberMeManager (org.apache.shiro.web.mgt.CookieRememberMeManager)1 SimpleCookie (org.apache.shiro.web.servlet.SimpleCookie)1 SimplePrincipalSerializer (org.nutz.integration.shiro.SimplePrincipalSerializer)1 IocBean (org.nutz.ioc.loader.annotation.IocBean)1