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.
 void reject(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Reject the outgoing response since the authentication has failed.
 

Method Detail

getAuthType

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


getAuthentication

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

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.

Throws:
java.io.IOException
javax.servlet.ServletException