Interface sun.server.http.security.HttpAuthentication
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface sun.server.http.security.HttpAuthentication

public interface HttpAuthentication
extends Object

Method Index

 o authenticate(HttpRequest)
A function that authenticates the request by reading the authenticate header field in the HTTP request.
 o getRealm()
returns the realm of the authentication.
 o getScheme()
returns the name of the authentication scheme.
 o sendError(HttpRequest, HttpResponse)
sends the unauthorized error to HttpResponse.

Methods

 o authenticate
  public abstract String authenticate(HttpRequest req) throws AuthenticationException
A function that authenticates the request by reading the authenticate header field in the HTTP request.
Parameters:
req - the Http request header.
Returns:
the name of the authenticated user.
Throws: AuthenticationException
is thrown if the request is unauthenticated.
 o getScheme
  public abstract String getScheme()
returns the name of the authentication scheme.
Returns:
the scheme used
 o getRealm
  public abstract String getRealm()
returns the realm of the authentication.
Returns:
the realm name
 o sendError
  public abstract void sendError(HttpRequest req,
                                 HttpResponse res) throws IOException
sends the unauthorized error to HttpResponse.
Parameters:
req - request
res - response

All Packages  Class Hierarchy  This Package  Previous  Next  Index