Home » commons-httpclient-3.1-src » org.apache.commons » httpclient » auth » [javadoc | source]
org.apache.commons.httpclient.auth
public class: DigestScheme [javadoc | source]
java.lang.Object
   org.apache.commons.httpclient.auth.RFC2617Scheme
      org.apache.commons.httpclient.auth.DigestScheme

All Implemented Interfaces:
    AuthScheme

Digest authentication scheme as defined in RFC 2617. Both MD5 (default) and MD5-sess are supported. Currently only qop=auth or no qop is supported. qop=auth-int is unsupported. If auth and auth-int are provided, auth is used.

Credential charset is configured via the credential charset parameter. Since the digest username is included as clear text in the generated Authentication header, the charset of the username must be compatible with the http element charset .

TODO: make class more stateful regarding repeated authentication requests
Constructor:
 public DigestScheme() 
 public DigestScheme(String challenge) throws MalformedChallengeException 
    Constructor for the digest authetication scheme.
    Parameters:
    challenge - authentication challenge
    Throws:
    MalformedChallengeException - is thrown if the authentication challenge is malformed
Method from org.apache.commons.httpclient.auth.DigestScheme Summary:
authenticate,   authenticate,   createCnonce,   getID,   getSchemeName,   isComplete,   isConnectionBased,   processChallenge
Methods from org.apache.commons.httpclient.auth.RFC2617Scheme:
getID,   getParameter,   getParameters,   getRealm,   processChallenge
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.commons.httpclient.auth.DigestScheme Detail:
 public String authenticate(Credentials credentials,
    HttpMethod method) throws AuthenticationException 
    Produces a digest authorization string for the given set of Credentials , method name and URI.
 public String authenticate(Credentials credentials,
    String method,
    String uri) throws AuthenticationException 
Deprecated! Use - #authenticate(Credentials, HttpMethod)

    Produces a digest authorization string for the given set of Credentials , method name and URI.
 public static String createCnonce() 
    Creates a random cnonce value based on the current time.
 public String getID() 
Deprecated! no - longer used

    Gets an ID based upon the realm and the nonce value. This ensures that requests to the same realm with different nonce values will succeed. This differentiation allows servers to request re-authentication using a fresh nonce value.
 public String getSchemeName() 
    Returns textual designation of the digest authentication scheme.
 public boolean isComplete() 
    Tests if the Digest authentication process has been completed.
 public boolean isConnectionBased() 
    Returns false. Digest authentication scheme is request based.
 public  void processChallenge(String challenge) throws MalformedChallengeException 
    Processes the Digest challenge.