Search in sources :

Example 36 with SecurityManager

use of org.apache.shiro.mgt.SecurityManager in project qi4j-sdk by Qi4j.

the class StandaloneShiroTest method documentationSupport_before.

public void documentationSupport_before() {
    // START SNIPPET: before
    IniSecurityManagerFactory factory = new IniSecurityManagerFactory("classpath:standalone-shiro.ini");
    SecurityManager securityManager = factory.getInstance();
    SecurityUtils.setSecurityManager(securityManager);
// END SNIPPET: before
}
Also used : IniSecurityManagerFactory(org.apache.shiro.config.IniSecurityManagerFactory) SecurityManager(org.apache.shiro.mgt.SecurityManager)

Aggregations

SecurityManager (org.apache.shiro.mgt.SecurityManager)36 DefaultSecurityManager (org.apache.shiro.mgt.DefaultSecurityManager)13 IniSecurityManagerFactory (org.apache.shiro.config.IniSecurityManagerFactory)11 Test (org.junit.Test)11 Injector (com.google.inject.Injector)8 Provides (com.google.inject.Provides)6 Subject (org.apache.shiro.subject.Subject)6 Session (org.apache.shiro.session.Session)5 WebSecurityManager (org.apache.shiro.web.mgt.WebSecurityManager)5 Realm (org.apache.shiro.realm.Realm)4 IniRealm (org.apache.shiro.realm.text.IniRealm)4 DefaultWebSecurityManager (org.apache.shiro.web.mgt.DefaultWebSecurityManager)4 UnavailableSecurityManagerException (org.apache.shiro.UnavailableSecurityManagerException)3 Ini (org.apache.shiro.config.Ini)3 DelegatingSubject (org.apache.shiro.subject.support.DelegatingSubject)3 AfterClass (org.junit.AfterClass)3 Callable (java.util.concurrent.Callable)2 ServletContext (javax.servlet.ServletContext)2 ConfigurationException (org.apache.shiro.config.ConfigurationException)2 ShiroModuleTest (org.apache.shiro.guice.ShiroModuleTest)2