|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AuthenticationHandler
Interface for server authentication mechanisms.
TheAuthenticationFilter
manages the lifecycle of the authentication handler.
Implementations must be thread-safe as once instance is initialized and used for all requests.
Method Summary | |
---|---|
AuthenticationToken |
authenticate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Performs an authentication step for the given HTTP client request. |
void |
destroy()
Destroys the authentication handler instance. |
String |
getType()
Returns the authentication type of the authentication handler. |
void |
init(Properties config)
Initializes the authentication handler instance. |
Method Detail |
---|
String getType()
void init(Properties config) throws javax.servlet.ServletException
AuthenticationFilter.init(javax.servlet.FilterConfig)
method.
config
- configuration properties to initialize the handler.
javax.servlet.ServletException
- thrown if the handler could not be initialized.void destroy()
AuthenticationFilter.destroy()
method.
AuthenticationToken authenticate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, AuthenticationException
AuthenticationFilter
only if the HTTP client request is
not yet authenticated.
Depending on on the authentication mechanism being implemented, a particular HTTP client may
end up making a sequence of invocations before authentication is successfully established (this is
the case of Kerberos SPNEGO).
This method must return an AuthenticationToken
only if the the HTTP client request has
been successfully and fully authenticated.
If the HTTP client request has not been completly authenticated, this method must take over
the corresponding HTTP response and it must return null
.
request
- the HTTP client request.response
- the HTTP client response.
AuthenticationToken
if the HTTP client request has been authenticated,
null
otherwise (in this case it must take care of the response).
IOException
- thrown if an IO error occurred.
AuthenticationException
- thrown if an Authentication error occurred.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |