com.dyuproject.web.auth
Class DigestAuthentication
java.lang.Object
com.dyuproject.web.auth.Authentication
com.dyuproject.web.auth.DigestAuthentication
- Direct Known Subclasses:
- SmartDigestAuthentication
public class DigestAuthentication
- extends Authentication
Web authorization using MD5 digest.
- Author:
- David Yu
Method Summary |
boolean |
authenticate(String realm,
HttpServletRequest request,
HttpServletResponse response)
|
protected boolean |
check(String username,
String password,
String realm,
String nonce,
String nc,
String cnonce,
String qop,
String uri,
String response,
HttpServletRequest request)
|
String |
getType()
|
protected String |
newNonce(HttpServletRequest request)
|
protected void |
sendChallenge(String realm,
HttpServletRequest request,
HttpServletResponse response)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
DigestAuthentication
public DigestAuthentication(CredentialSource credentialSource)
getType
public String getType()
- Specified by:
getType
in class Authentication
authenticate
public boolean authenticate(String realm,
HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
- Specified by:
authenticate
in class Authentication
- Throws:
ServletException
IOException
check
protected boolean check(String username,
String password,
String realm,
String nonce,
String nc,
String cnonce,
String qop,
String uri,
String response,
HttpServletRequest request)
sendChallenge
protected void sendChallenge(String realm,
HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
- Throws:
ServletException
IOException
newNonce
protected String newNonce(HttpServletRequest request)
Copyright © 2013. All Rights Reserved.