Interface AuthenticationHandler
AuthenticationHandler interface defines the service API used
by the authentication implementation to support plugin various ways of
extracting credentials from the request.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.An authentication handler is associated with url paths. -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Deprecated.Extracts credential data from the request if at all contained.booleanrequestAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Deprecated.Requests authentication information from the client.
-
Field Details
-
PATH_PROPERTY
Deprecated.An authentication handler is associated with url paths. If the handler is not configured with a path, it is regarded as inactive. If the handler should be used for all requests, the path should be '/'.- See Also:
-
-
Method Details
-
authenticate
AuthenticationInfo authenticate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Deprecated.Extracts credential data from the request if at all contained.The method returns any of the following values :
Extracted Information value description nullno user details were contained in the request or the handler is not capable or willing to extract credentials from the request AuthenticationInfo.DOING_AUTHthe handler is in an ongoing authentication transaction with the client. Request processing should be aborted at this stage. AuthenticationInfoobjectThe 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
PATH_PROPERTYservice registration property value triggering this call is available as thepathrequest attribute. If the service is registered with multiple path values, the value of thepathrequest attribute may be used to implement specific handling.- Parameters:
request- The request object containing the information for the authentication.response- The response object which may be used to send the information on the request failure to the user.- Returns:
- A valid
AuthenticationInfoinstance identifying the request user,AuthenticationInfo.DOING_AUTHif the handler is in an authentication transaction with the client or null if the request does not contain authentication information. In case ofAuthenticationInfo.DOING_AUTH, the method must have sent a response indicating that fact to the client.
-
requestAuthentication
boolean requestAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException Deprecated.Requests authentication information from the client. Returnstrueif the information has been requested and request processing can be terminated normally. Otherwise the authorization information could not be requested.Any response sent by the handler though the
sendErrormethod is also handled by the error handler infrastructure.The value of
PATH_PROPERTYservice registration property value triggering this call is available as thepathrequest attribute. If the service is registered with multiple path values, the value of thepathrequest attribute may be used to implement specific handling.- Parameters:
request- The request object.response- The response object to which to send the request.- Returns:
trueif the handler is able to end an authentication inquiry for the given request.falseotherwise.- Throws:
IOException- If an error occurrs sending the authentication inquiry to the client.
-
AuthenticationHandlerinstead