public class DefaultSubjectFactory extends Object implements SubjectFactory
SubjectFactory implementation that creates DelegatingSubject
instances.| Constructor and Description |
|---|
DefaultSubjectFactory() |
| Modifier and Type | Method and Description |
|---|---|
Subject |
createSubject(SubjectContext context)
Creates a new Subject instance reflecting the state of the specified contextual data.
|
protected Subject |
newSubjectInstance(PrincipalCollection principals,
boolean authenticated,
String host,
Session session,
SecurityManager securityManager)
Deprecated.
since 1.2 - override
createSubject(org.apache.shiro.subject.SubjectContext) directly if you
need to instantiate a custom Subject class. |
public Subject createSubject(SubjectContext context)
SubjectFactorySubject instance and its contents can vary based on
environment.
Any data supported by Shiro core will be accessible by one of the SubjectContext's get*
or resolve* methods. All other data is available as map attributes.createSubject in interface SubjectFactorycontext - the contextual data to be used by the implementation to construct an appropriate Subject
instance.Subject instance created based on the specified context.SubjectContext@Deprecated protected Subject newSubjectInstance(PrincipalCollection principals, boolean authenticated, String host, Session session, SecurityManager securityManager)
createSubject(org.apache.shiro.subject.SubjectContext) directly if you
need to instantiate a custom Subject class.Copyright © 2004-2016 The Apache Software Foundation. All Rights Reserved.