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

    Nested classes/interfaces inherited from interface java.util.Map

    Map.Entry<K,V>
  • Field Summary

    Fields inherited from class org.apache.shiro.subject.support.DefaultSubjectContext

    AUTHENTICATED_SESSION_KEY, PRINCIPALS_SESSION_KEY, SESSION_CREATION_ENABLED
  • Constructor Summary

    Constructors
    Constructor
    Description
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    javax.servlet.ServletRequest
    Returns the ServletRequest received by the servlet container triggering the creation of the Subject instance.
    javax.servlet.ServletResponse
    The paired ServletResponse corresponding to the associated servletRequest.
     
    javax.servlet.ServletRequest
     
    javax.servlet.ServletResponse
     
    void
    setServletRequest(javax.servlet.ServletRequest request)
    Sets the ServletRequest received by the servlet container triggering the creation of the Subject instance.
    void
    setServletResponse(javax.servlet.ServletResponse response)
    Sets the paired ServletResponse corresponding to the associated servletRequest.

    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, setSubject

    Methods inherited from class org.apache.shiro.util.MapContext

    clear, containsKey, containsValue, entrySet, get, getTypedValue, isEmpty, keySet, nullSafePut, put, putAll, remove, size, values

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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

      public DefaultWebSubjectContext(WebSubjectContext context)
  • Method Details

    • resolveHost

      public String resolveHost()
      Specified by:
      resolveHost in interface org.apache.shiro.subject.SubjectContext
      Overrides:
      resolveHost in class org.apache.shiro.subject.support.DefaultSubjectContext
    • getServletRequest

      public javax.servlet.ServletRequest getServletRequest()
      Description copied from interface: WebSubjectContext
      Returns the ServletRequest received by the servlet container triggering the creation of the Subject instance.
      Specified by:
      getServletRequest in interface RequestPairSource
      Specified by:
      getServletRequest in interface WebSubjectContext
      Returns:
      the ServletRequest received by the servlet container triggering the creation of the Subject instance.
    • setServletRequest

      public void setServletRequest(javax.servlet.ServletRequest request)
      Description copied from interface: WebSubjectContext
      Sets the ServletRequest received by the servlet container triggering the creation of the Subject instance.
      Specified by:
      setServletRequest in interface WebSubjectContext
      Parameters:
      request - the ServletRequest received by the servlet container triggering the creation of the Subject instance.
    • resolveServletRequest

      public javax.servlet.ServletRequest resolveServletRequest()
      Specified by:
      resolveServletRequest in interface WebSubjectContext
    • getServletResponse

      public javax.servlet.ServletResponse getServletResponse()
      Description copied from interface: WebSubjectContext
      The paired ServletResponse corresponding to the associated servletRequest.
      Specified by:
      getServletResponse in interface RequestPairSource
      Specified by:
      getServletResponse in interface WebSubjectContext
      Returns:
      the paired ServletResponse corresponding to the associated servletRequest.
    • setServletResponse

      public void setServletResponse(javax.servlet.ServletResponse response)
      Description copied from interface: WebSubjectContext
      Sets the paired ServletResponse corresponding to the associated servletRequest.
      Specified by:
      setServletResponse in interface WebSubjectContext
      Parameters:
      response - The paired ServletResponse corresponding to the associated servletRequest.
    • resolveServletResponse

      public javax.servlet.ServletResponse resolveServletResponse()
      Specified by:
      resolveServletResponse in interface WebSubjectContext