use of org.apache.shiro.web.mgt.DefaultWebSecurityManager in project Ganster-CMS by Gangster-trio.
the class ShiroConfig method securityManager.
@Bean(name = "securityManager")
public SecurityManager securityManager() {
DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager();
// 设置realm
securityManager.setRealm(shiroRealm());
return securityManager;
}
use of org.apache.shiro.web.mgt.DefaultWebSecurityManager in project moon by gentoo111.
the class ShiroConfig method securityManager.
@Bean
public SecurityManager securityManager(EhCacheManager cacheManager) {
DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager();
securityManager.setRealm(myShiroRealm());
securityManager.setCacheManager(cacheManager);
return securityManager;
}
use of org.apache.shiro.web.mgt.DefaultWebSecurityManager in project springBoot-learn-demo by nbfujx.
the class ShiroConfig method securityManager.
/**
* SecurityManager,权限管理,这个类组合了登陆,登出,权限,session的处理,是个比较重要的类。
*/
@Bean(name = "securityManager")
public DefaultWebSecurityManager securityManager() {
DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager();
securityManager.setRealm(shiroRealm());
securityManager.setCacheManager(redisCacheManager());
securityManager.setSessionManager(sessionManager());
return securityManager;
}
use of org.apache.shiro.web.mgt.DefaultWebSecurityManager in project Spring-Family by Sierou-Java.
the class ShiroConfiguration method securityManager.
// /////////////////////////////////////记住我 END/////////////////////////////////////
@Bean
public SecurityManager securityManager() {
DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager();
// 设置realm.
securityManager.setRealm(myShiroRealm());
// 注入缓存管理器;
// 这个如果执行多次,也是同样的一个对象;
securityManager.setCacheManager(ehCacheManager());
// 注入记住我管理器;
securityManager.setRememberMeManager(rememberMeManager());
return securityManager;
}
use of org.apache.shiro.web.mgt.DefaultWebSecurityManager in project shiro by apache.
the class SampleShiroNativeSessionsServletModule method bindWebSecurityManager.
@Override
protected void bindWebSecurityManager(AnnotatedBindingBuilder<? super WebSecurityManager> bind) {
try {
String cipherKey = loadShiroIni().getSectionProperty("main", "securityManager.rememberMeManager.cipherKey");
DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager();
CookieRememberMeManager rememberMeManager = new CookieRememberMeManager();
rememberMeManager.setCipherKey(Base64.decode(cipherKey));
securityManager.setRememberMeManager(rememberMeManager);
bind.toInstance(securityManager);
} catch (MalformedURLException e) {
// super.bindWebSecurityManager(bind) if you do not need rememberMe functionality
throw new ConfigurationException("securityManager.rememberMeManager.cipherKey must be set in shiro.ini.");
}
}
Aggregations