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

Class sun.server.http.security.BasicHttpAuthentication

java.lang.Object
   |
   +----sun.server.http.security.BasicHttpAuthentication

public class BasicHttpAuthentication
extends Object
implements HttpAuthentication
This is a class that does the basic user/passwd based authentication for the Basic http protocol.

Constructor Index

 o BasicHttpAuthentication(String, HttpSecurityAclInfo)

Method Index

 o authenticate(HttpRequest)
implement the HttpAuthentication interface using the base64 encoding scheme.
 o getRealm()
returns the realm of the authentication.
 o getScheme()
returns the name of the authentication scheme.
 o sendError(HttpRequest, HttpResponse)
sends a authorization error to the client.

Constructors

 o BasicHttpAuthentication
  public BasicHttpAuthentication(String realmName,
                                 HttpSecurityAclInfo aclInfo)

Methods

 o getScheme
  public String getScheme()
returns the name of the authentication scheme.
Returns:
the scheme used
 o getRealm
  public String getRealm()
returns the realm of the authentication.
Returns:
the realm name
 o authenticate
  public String authenticate(HttpRequest req) throws AuthenticationException
implement the HttpAuthentication interface using the base64 encoding scheme.
Throws: AuthenticationException
exception
 o sendError
  public void sendError(HttpRequest req,
                        HttpResponse res) throws IOException
sends a authorization error to the client.
Parameters:
req - request
res - response

All Packages  Class Hierarchy  This Package  Previous  Next  Index