public class HttpServletAuthParam extends Object implements AuthParam
HttpServletAuthParam may be created with null request or response objects. The following table describes when it is appropriate to pass null:
Request Response
------- --------
ClientAuthModule.secureRequest non-null null
ClientAuthModule.validateResponse null non-null
ServerAuthModule.validateRequest non-null null
ServerAuthModule.secureResponse null non-null
As noted above, in the case of ServerAuthModule.validateRequest the module receives a null response
object. If the implementation of validateRequest encounters an authentication error, it may construct
the appropriate response object itself and set it into the HttpServletAuthParam via the setResponse
method.
| Constructor and Description |
|---|
HttpServletAuthParam(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Create an HttpServletAuthParam with HTTP request and response objects.
|
HttpServletAuthParam(javax.security.auth.message.MessageInfo messageInfo)
Create an HttpServletAuthParam with MessageInfo object.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getOperation()
Get the operation related to the encapsulated HTTP Servlet request and response objects.
|
javax.servlet.http.HttpServletRequest |
getRequest()
Get the HTTP Servlet request object.
|
javax.servlet.http.HttpServletResponse |
getResponse()
Get the HTTP Servlet response object.
|
void |
setResponse(javax.servlet.http.HttpServletResponse response)
Set a new HTTP Servlet response object.
|
public HttpServletAuthParam(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
request - the HTTP Servlet request object, or null.response - the HTTP Servlet response object, or null.public HttpServletAuthParam(javax.security.auth.message.MessageInfo messageInfo)
messageInfo - public javax.servlet.http.HttpServletRequest getRequest()
public javax.servlet.http.HttpServletResponse getResponse()
public void setResponse(javax.servlet.http.HttpServletResponse response)
If a response has already been set (it is non-null), this method returns. The original response is not overwritten.
response - the HTTP Servlet response object.IllegalArgumentException - if the specified response is null.public String getOperation()
Copyright © 2019. All rights reserved.