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

Class sun.server.http.security.DigestAuthentication

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

public class DigestAuthentication
extends Object
implements HttpAuthentication
DigestAuthentication This class implements MD5 based Digest authentication in accordance with draft-ietf-http-digest-aa-04

Constructor Index

 o DigestAuthentication(String, HttpSecurityAclInfo)

Method Index

 o authenticate(HttpRequest)
A function that authenticates the digest request by reading the authenticate header field in the HTTP request.
 o generateNonce(HttpRequest)
generates nonce string using the remote host address and current time, checks for existence of the same nonce, put nonce, remote address, and timestamp into nonce table
 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 DigestAuthentication
  public DigestAuthentication(String realm,
                              HttpSecurityAclInfo aclInfo)

Methods

 o getScheme
  public String getScheme()
returns the name of the authentication scheme.
Returns:
"Digest"
 o getRealm
  public String getRealm()
returns the realm of the authentication.
Returns:
the realm name
 o authenticate
  public String authenticate(HttpRequest req) throws AuthenticationException
A function that authenticates the digest 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 generateNonce
  public String generateNonce(HttpRequest req)
generates nonce string using the remote host address and current time, checks for existence of the same nonce, put nonce, remote address, and timestamp into nonce table
Parameters:
req - HttpRequest
 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