use of org.apache.shiro.mgt.SecurityManager in project neo4j by neo4j.
the class ShiroSubjectFactory method createSubject.
@Override
public Subject createSubject(SubjectContext context) {
SecurityManager securityManager = context.resolveSecurityManager();
Session session = context.resolveSession();
boolean sessionCreationEnabled = context.isSessionCreationEnabled();
PrincipalCollection principals = context.resolvePrincipals();
boolean authenticated = context.resolveAuthenticated();
String host = context.resolveHost();
ShiroAuthenticationInfo authcInfo = (ShiroAuthenticationInfo) context.getAuthenticationInfo();
return new ShiroSubject(principals, authenticated, host, session, sessionCreationEnabled, securityManager, authcInfo.getAuthenticationResult());
}
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
}
Aggregations