public class QueryTokenAuthenticationHandler extends java.lang.Object implements AuthenticationHandler
| Modifier and Type | Class and Description |
|---|---|
static interface |
QueryTokenAuthenticationHandler.Config |
AuthenticationHandler.FAILURE_REASON_CODESFAILURE_REASON, FAILURE_REASON_CODE, PATH_PROPERTY, REQUEST_LOGIN_PARAMETER, SERVICE_NAME, TYPE_PROPERTY| Constructor and Description |
|---|
QueryTokenAuthenticationHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
dropCredentials(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
Drops any credential and authentication details from the request and asks
the client to do the same.
|
AuthenticationInfo |
extractCredentials(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
Extracts credential data from the request if at all contained.
|
boolean |
requestCredentials(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
Requests authentication information from the client.
|
public AuthenticationInfo extractCredentials(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)
AuthenticationHandlerThe method returns any of the following values :
| value | description |
|---|---|
null
| no user details were contained in the request or the handler is not capable or willing to extract credentials from the request |
AuthenticationInfo.DOING_AUTH
| the handler is in an ongoing authentication transaction with the client. Request processing should be aborted at this stage. |
AuthenticationInfo.FAIL_AUTH
| the handler failed extracting the credentials from the request for
any reason. An example of this result is that credentials are present in
the request but they could not be validated and thus not be used for
request processing. When returning this value, the authentication handler
may also set the AuthenticationHandler.FAILURE_REASON request attribute to inform
interested parties (including its own
AuthenticationHandler.requestCredentials(HttpServletRequest, HttpServletResponse)
method for the reasons of failure to extract the credentials.
|
AuthenticationInfo object
| The user sent credentials. The returned object contains the credentials as well as the type of authentication transmission employed. |
The method must not request credential information from the client, if they are not found in the request.
The value of AuthenticationHandler.PATH_PROPERTY service registration property value
triggering this call is available as the path request
attribute. If the service is registered with multiple path values, the
value of the path request attribute may be used to implement
specific handling.
extractCredentials in interface AuthenticationHandlerhttpServletRequest - The request object containing the information for the
authentication.httpServletResponse - The response object which may be used to send the
information on the request failure to the user.AuthenticationInfo instance identifying the
request user, AuthenticationInfo.DOING_AUTH if the
handler is in an authentication transaction with the client or
null if the request does not contain authentication information.
In case of AuthenticationInfo.DOING_AUTH, the method must
have sent a response indicating that fact to the client.public boolean requestCredentials(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
throws java.io.IOException
AuthenticationHandlertrue if the information has been requested and request
processing can be terminated normally. Otherwise the authorization
information could not be requested.
The HttpServletResponse.sendError methods should not be used
by the implementation because these responses might be post-processed by
the servlet container's error handling infrastructure thus preventing the
correct operation of the authentication handler. To convey a HTTP
response status the HttpServletResponse.setStatus method
should be used.
The value of AuthenticationHandler.PATH_PROPERTY service registration property value
triggering this call is available as the path request
attribute. If the service is registered with multiple path values, the
value of the path request attribute may be used to implement
specific handling.
If the AuthenticationHandler.REQUEST_LOGIN_PARAMETER request parameter is set only
those authentication handlers registered with an authentication type matching the parameter will be considered for
requesting credentials through this method.
A handler not registered with an authentication
type will, for backwards compatibility reasons, always be called
ignoring the actual value of the AuthenticationHandler.REQUEST_LOGIN_PARAMETER
parameter.
requestCredentials in interface AuthenticationHandlerhttpServletRequest - The request object.httpServletResponse - The response object to which to send the request.true if the handler is able to send an authentication
inquiry for the given request. false otherwise.java.io.IOException - If an error occurs sending the authentication
inquiry to the client.public void dropCredentials(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
throws java.io.IOException
AuthenticationHandlerdropCredentials in interface AuthenticationHandlerhttpServletRequest - The request object.httpServletResponse - The response object to which to send the request.java.io.IOException - If an error occurs asking the client to drop any
authentication traces.Copyright © 2010 - 2025 Adobe. All Rights Reserved