Class WebDelegatingSubject
java.lang.Object
org.apache.shiro.subject.support.DelegatingSubject
org.apache.shiro.web.subject.support.WebDelegatingSubject
- All Implemented Interfaces:
org.apache.shiro.subject.Subject,WebSubject,RequestPairSource
public class WebDelegatingSubject
extends org.apache.shiro.subject.support.DelegatingSubject
implements WebSubject
Default
WebSubject implementation that additional ensures the ability to retain a
servlet request/response pair to be used by internal shiro components as necessary during the request execution.- Since:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.shiro.subject.Subject
org.apache.shiro.subject.Subject.BuilderNested classes/interfaces inherited from interface org.apache.shiro.web.subject.WebSubject
WebSubject.Builder -
Field Summary
Fields inherited from class org.apache.shiro.subject.support.DelegatingSubject
authenticated, host, principals, securityManager, session, sessionCreationEnabled -
Constructor Summary
ConstructorsConstructorDescriptionWebDelegatingSubject(org.apache.shiro.subject.PrincipalCollection principals, boolean authenticated, String host, org.apache.shiro.session.Session session, boolean sessionEnabled, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, org.apache.shiro.mgt.SecurityManager securityManager) WebDelegatingSubject(org.apache.shiro.subject.PrincipalCollection principals, boolean authenticated, String host, org.apache.shiro.session.Session session, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, org.apache.shiro.mgt.SecurityManager securityManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.shiro.session.mgt.SessionContextjavax.servlet.ServletRequestReturns theServletRequestaccessible when the Subject instance was created.javax.servlet.ServletResponseReturns theServletResponseaccessible when the Subject instance was created.protected booleanReturnstrueif session creation is allowed (as determined by the super class's} value and no request-specific override has disabled sessions for this subject,invalid @link
{@link super#isSessionCreationEnabled()falseotherwise.Methods inherited from class org.apache.shiro.subject.support.DelegatingSubject
assertAuthzCheckPossible, associateWith, associateWith, checkPermission, checkPermission, checkPermissions, checkPermissions, checkRole, checkRoles, checkRoles, decorate, execute, execute, getHost, getPreviousPrincipals, getPrincipal, getPrincipals, getSecurityManager, getSession, getSession, hasAllRoles, hasPrincipals, hasRole, hasRoles, isAuthenticated, isPermitted, isPermitted, isPermitted, isPermitted, isPermittedAll, isPermittedAll, isRemembered, isRunAs, login, logout, releaseRunAs, runAs, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.shiro.subject.Subject
associateWith, associateWith, checkPermission, checkPermission, checkPermissions, checkPermissions, checkRole, checkRoles, checkRoles, execute, execute, getPreviousPrincipals, getPrincipal, getPrincipals, getSession, getSession, hasAllRoles, hasRole, hasRoles, isAuthenticated, isPermitted, isPermitted, isPermitted, isPermitted, isPermittedAll, isPermittedAll, isRemembered, isRunAs, login, logout, releaseRunAs, runAs
-
Constructor Details
-
WebDelegatingSubject
public WebDelegatingSubject(org.apache.shiro.subject.PrincipalCollection principals, boolean authenticated, String host, org.apache.shiro.session.Session session, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, org.apache.shiro.mgt.SecurityManager securityManager) -
WebDelegatingSubject
public WebDelegatingSubject(org.apache.shiro.subject.PrincipalCollection principals, boolean authenticated, String host, org.apache.shiro.session.Session session, boolean sessionEnabled, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, org.apache.shiro.mgt.SecurityManager securityManager)
-
-
Method Details
-
getServletRequest
Description copied from interface:WebSubjectReturns theServletRequestaccessible when the Subject instance was created.- Specified by:
getServletRequestin interfaceRequestPairSource- Specified by:
getServletRequestin interfaceWebSubject- Returns:
- the
ServletRequestaccessible when the Subject instance was created.
-
getServletResponse
Description copied from interface:WebSubjectReturns theServletResponseaccessible when the Subject instance was created.- Specified by:
getServletResponsein interfaceRequestPairSource- Specified by:
getServletResponsein interfaceWebSubject- Returns:
- the
ServletResponseaccessible when the Subject instance was created.
-
isSessionCreationEnabled
Returnstrueif session creation is allowed (as determined by the super class's} value and no request-specific override has disabled sessions for this subject,invalid @link
{@link super#isSessionCreationEnabled()falseotherwise. This means session creation is disabled if the super} property isinvalid @link
{@link super#isSessionCreationEnabled()falseor if a request attribute is discovered that turns off sessions for the current request.- Overrides:
isSessionCreationEnabledin classorg.apache.shiro.subject.support.DelegatingSubject- Returns:
trueif session creation is allowed (as determined by the super class's} value and no request-specific override has disabled sessions for this subject,invalid @link
{@link super#isSessionCreationEnabled()falseotherwise.- Since:
- 1.2
-
createSessionContext
- Overrides:
createSessionContextin classorg.apache.shiro.subject.support.DelegatingSubject
-