public class WebDelegatingSubject extends DelegatingSubject implements WebSubject
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.WebSubject.Builder
authenticated, host, principals, securityManager, session, sessionCreationEnabled
Constructor and Description |
---|
WebDelegatingSubject(PrincipalCollection principals,
boolean authenticated,
String host,
Session session,
boolean sessionEnabled,
ServletRequest request,
ServletResponse response,
SecurityManager securityManager) |
WebDelegatingSubject(PrincipalCollection principals,
boolean authenticated,
String host,
Session session,
ServletRequest request,
ServletResponse response,
SecurityManager securityManager) |
Modifier and Type | Method and Description |
---|---|
protected SessionContext |
createSessionContext() |
ServletRequest |
getServletRequest()
Returns the
ServletRequest accessible when the Subject instance was created. |
ServletResponse |
getServletResponse()
Returns the
ServletResponse accessible when the Subject instance was created. |
protected boolean |
isSessionCreationEnabled()
Returns
true if session creation is allowed (as determined by the super class's
super#isSessionCreationEnabled() value and no request-specific override has disabled sessions for this subject,
false otherwise. |
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
public WebDelegatingSubject(PrincipalCollection principals, boolean authenticated, String host, Session session, ServletRequest request, ServletResponse response, SecurityManager securityManager)
public WebDelegatingSubject(PrincipalCollection principals, boolean authenticated, String host, Session session, boolean sessionEnabled, ServletRequest request, ServletResponse response, SecurityManager securityManager)
public ServletRequest getServletRequest()
WebSubject
ServletRequest
accessible when the Subject instance was created.getServletRequest
in interface WebSubject
getServletRequest
in interface RequestPairSource
ServletRequest
accessible when the Subject instance was created.public ServletResponse getServletResponse()
WebSubject
ServletResponse
accessible when the Subject instance was created.getServletResponse
in interface WebSubject
getServletResponse
in interface RequestPairSource
ServletResponse
accessible when the Subject instance was created.protected boolean isSessionCreationEnabled()
true
if session creation is allowed (as determined by the super class's
super#isSessionCreationEnabled()
value and no request-specific override has disabled sessions for this subject,
false
otherwise.
This means session creation is disabled if the super super#isSessionCreationEnabled()
property is false
or if a request attribute is discovered that turns off sessions for the current request.isSessionCreationEnabled
in class DelegatingSubject
true
if session creation is allowed (as determined by the super class's
super#isSessionCreationEnabled()
value and no request-specific override has disabled sessions for this
subject, false
otherwise.protected SessionContext createSessionContext()
createSessionContext
in class DelegatingSubject
Copyright © 2004-2016 The Apache Software Foundation. All Rights Reserved.