com.evermind.server.http
Interface HttpAuthenticator


public interface HttpAuthenticator

A HttpAuthenticator handles the authorization protocol of the incoming requests and supplies a way of authenticating the user making the request.


Method Summary
 java.net.PasswordAuthentication getAuthentication(javax.servlet.http.HttpServletRequest request)
          Identifies the user associated with this request (if any) and returns it's username, null if no user is associated with the request.
 java.lang.String getAuthType()
          Returns the authorization-type of this Authenticator. (ie "Basic", "Form", ...)
 void reject(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Reject the outgoing response since the authentication has failed.
 

Method Detail

getAuthType


public java.lang.String getAuthType()
Returns the authorization-type of this Authenticator. (ie "Basic", "Form", ...)

getAuthentication


public java.net.PasswordAuthentication getAuthentication(javax.servlet.http.HttpServletRequest request)
Identifies the user associated with this request (if any) and returns it's username, null if no user is associated with the request.
Parameters:
request - The request for which to establish the user identity
Returns:
The username of the user making the request or null if no user is associated with the request.

reject


public void reject(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws java.io.IOException,
                   javax.servlet.ServletException
Reject the outgoing response since the authentication has failed.