public class DefaultWebSubjectContext extends DefaultSubjectContext implements WebSubjectContext
WebSubjectContext
implementation that provides for additional storage and retrieval of
a ServletRequest
and ServletResponse
.AUTHENTICATED_SESSION_KEY, PRINCIPALS_SESSION_KEY, SESSION_CREATION_ENABLED
Constructor and Description |
---|
DefaultWebSubjectContext() |
DefaultWebSubjectContext(WebSubjectContext context) |
Modifier and Type | Method and Description |
---|---|
javax.servlet.ServletRequest |
getServletRequest()
Returns the
ServletRequest received by the servlet container triggering the creation of the
Subject instance. |
javax.servlet.ServletResponse |
getServletResponse()
The paired
ServletResponse corresponding to the associated servletRequest . |
String |
resolveHost() |
javax.servlet.ServletRequest |
resolveServletRequest() |
javax.servlet.ServletResponse |
resolveServletResponse() |
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 . |
getAuthenticationInfo, getAuthenticationToken, getHost, getPrincipals, getSecurityManager, getSession, getSessionId, getSubject, isAuthenticated, isSessionCreationEnabled, resolveAuthenticated, resolvePrincipals, resolveSecurityManager, resolveSession, setAuthenticated, setAuthenticationInfo, setAuthenticationToken, setHost, setPrincipals, setSecurityManager, setSession, setSessionCreationEnabled, setSessionId, setSubject
clear, containsKey, containsValue, entrySet, get, getTypedValue, isEmpty, keySet, nullSafePut, put, putAll, remove, size, values
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAuthenticationInfo, getAuthenticationToken, getHost, getPrincipals, getSecurityManager, getSession, getSessionId, getSubject, isAuthenticated, isSessionCreationEnabled, resolveAuthenticated, resolvePrincipals, resolveSecurityManager, resolveSession, setAuthenticated, setAuthenticationInfo, setAuthenticationToken, setHost, setPrincipals, setSecurityManager, setSession, setSessionCreationEnabled, setSessionId, setSubject
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
public DefaultWebSubjectContext()
public DefaultWebSubjectContext(WebSubjectContext context)
public String resolveHost()
resolveHost
in interface SubjectContext
resolveHost
in class DefaultSubjectContext
public javax.servlet.ServletRequest getServletRequest()
WebSubjectContext
ServletRequest
received by the servlet container triggering the creation of the
Subject
instance.getServletRequest
in interface WebSubjectContext
getServletRequest
in interface RequestPairSource
ServletRequest
received by the servlet container triggering the creation of the
Subject
instance.public void setServletRequest(javax.servlet.ServletRequest request)
WebSubjectContext
ServletRequest
received by the servlet container triggering the creation of the
Subject
instance.setServletRequest
in interface WebSubjectContext
request
- the ServletRequest
received by the servlet container triggering the creation of the
Subject
instance.public javax.servlet.ServletRequest resolveServletRequest()
resolveServletRequest
in interface WebSubjectContext
public javax.servlet.ServletResponse getServletResponse()
WebSubjectContext
ServletResponse
corresponding to the associated servletRequest
.getServletResponse
in interface WebSubjectContext
getServletResponse
in interface RequestPairSource
ServletResponse
corresponding to the associated
servletRequest
.public void setServletResponse(javax.servlet.ServletResponse response)
WebSubjectContext
ServletResponse
corresponding to the associated servletRequest
.setServletResponse
in interface WebSubjectContext
response
- The paired ServletResponse
corresponding to the associated
servletRequest
.public javax.servlet.ServletResponse resolveServletResponse()
resolveServletResponse
in interface WebSubjectContext
Copyright © 2004–2019 The Apache Software Foundation. All rights reserved.