com.bradmcevoy.http.http11.auth
Class DigestGenerator
java.lang.Object
com.bradmcevoy.http.http11.auth.DigestGenerator
public class DigestGenerator
- extends java.lang.Object
- Author:
- brad
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DigestGenerator
public DigestGenerator()
generateDigest
public java.lang.String generateDigest(DigestResponse dr,
java.lang.String password)
throws java.lang.IllegalArgumentException
- Computes the
response portion of a Digest authentication header. Both the server and user
agent should compute the response independently. Provided as a static method to simplify the
coding of user agents.
- Parameters:
dr - - the auth request from the clientpassword - - plain text unencoded password
- Returns:
- the MD5 of the digest authentication response, encoded in hex
- Throws:
java.lang.IllegalArgumentException - if the supplied qop value is unsupported.
generateDigestWithEncryptedPassword
public java.lang.String generateDigestWithEncryptedPassword(DigestResponse dr,
java.lang.String a1Md5)
throws java.lang.IllegalArgumentException
- Use this method if you are persisting a one way hash of the user name, password
and realm (referred to as a1md5 in the spec)
- Parameters:
dr - a1Md5 -
- Returns:
-
- Throws:
java.lang.IllegalArgumentException
encodePasswordInA1Format
public java.lang.String encodePasswordInA1Format(java.lang.String username,
java.lang.String realm,
java.lang.String password)
Copyright © 2011. All Rights Reserved.