Class DefaultWebSubjectContext
java.lang.Object
org.apache.shiro.util.MapContext
org.apache.shiro.subject.support.DefaultSubjectContext
org.apache.shiro.web.subject.support.DefaultWebSubjectContext
- All Implemented Interfaces:
Serializable,Map<String,,Object> org.apache.shiro.subject.SubjectContext,WebSubjectContext,RequestPairSource
public class DefaultWebSubjectContext
extends org.apache.shiro.subject.support.DefaultSubjectContext
implements WebSubjectContext
Default
WebSubjectContext implementation that provides for additional storage and retrieval of
a ServletRequest and ServletResponse.- Since:
- 1.0
- See Also:
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.apache.shiro.subject.support.DefaultSubjectContext
AUTHENTICATED_SESSION_KEY, PRINCIPALS_SESSION_KEY, SESSION_CREATION_ENABLED -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionjavax.servlet.ServletRequestReturns theServletRequestreceived by the servlet container triggering the creation of theSubjectinstance.javax.servlet.ServletResponseThe pairedServletResponsecorresponding to the associatedservletRequest.javax.servlet.ServletRequestjavax.servlet.ServletResponsevoidsetServletRequest(javax.servlet.ServletRequest request) Sets theServletRequestreceived by the servlet container triggering the creation of theSubjectinstance.voidsetServletResponse(javax.servlet.ServletResponse response) Sets the pairedServletResponsecorresponding to the associatedservletRequest.Methods inherited from class org.apache.shiro.subject.support.DefaultSubjectContext
getAuthenticationInfo, getAuthenticationToken, getHost, getPrincipals, getSecurityManager, getSession, getSessionId, getSubject, isAuthenticated, isSessionCreationEnabled, resolveAuthenticated, resolvePrincipals, resolveSecurityManager, resolveSession, setAuthenticated, setAuthenticationInfo, setAuthenticationToken, setHost, setPrincipals, setSecurityManager, setSession, setSessionCreationEnabled, setSessionId, setSubjectMethods inherited from class org.apache.shiro.util.MapContext
clear, containsKey, containsValue, entrySet, get, getTypedValue, isEmpty, keySet, nullSafePut, put, putAll, remove, size, valuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from interface org.apache.shiro.subject.SubjectContext
getAuthenticationInfo, getAuthenticationToken, getHost, getPrincipals, getSecurityManager, getSession, getSessionId, getSubject, isAuthenticated, isSessionCreationEnabled, resolveAuthenticated, resolvePrincipals, resolveSecurityManager, resolveSession, setAuthenticated, setAuthenticationInfo, setAuthenticationToken, setHost, setPrincipals, setSecurityManager, setSession, setSessionCreationEnabled, setSessionId, setSubject
-
Constructor Details
-
DefaultWebSubjectContext
public DefaultWebSubjectContext() -
DefaultWebSubjectContext
-
-
Method Details
-
resolveHost
- Specified by:
resolveHostin interfaceorg.apache.shiro.subject.SubjectContext- Overrides:
resolveHostin classorg.apache.shiro.subject.support.DefaultSubjectContext
-
getServletRequest
Description copied from interface:WebSubjectContextReturns theServletRequestreceived by the servlet container triggering the creation of theSubjectinstance.- Specified by:
getServletRequestin interfaceRequestPairSource- Specified by:
getServletRequestin interfaceWebSubjectContext- Returns:
- the
ServletRequestreceived by the servlet container triggering the creation of theSubjectinstance.
-
setServletRequest
Description copied from interface:WebSubjectContextSets theServletRequestreceived by the servlet container triggering the creation of theSubjectinstance.- Specified by:
setServletRequestin interfaceWebSubjectContext- Parameters:
request- theServletRequestreceived by the servlet container triggering the creation of theSubjectinstance.
-
resolveServletRequest
- Specified by:
resolveServletRequestin interfaceWebSubjectContext
-
getServletResponse
Description copied from interface:WebSubjectContextThe pairedServletResponsecorresponding to the associatedservletRequest.- Specified by:
getServletResponsein interfaceRequestPairSource- Specified by:
getServletResponsein interfaceWebSubjectContext- Returns:
- the paired
ServletResponsecorresponding to the associatedservletRequest.
-
setServletResponse
Description copied from interface:WebSubjectContextSets the pairedServletResponsecorresponding to the associatedservletRequest.- Specified by:
setServletResponsein interfaceWebSubjectContext- Parameters:
response- The pairedServletResponsecorresponding to the associatedservletRequest.
-
resolveServletResponse
- Specified by:
resolveServletResponsein interfaceWebSubjectContext
-