com.dyuproject.web.auth
Class SmartDigestAuthentication

java.lang.Object
  extended by com.dyuproject.web.auth.Authentication
      extended by com.dyuproject.web.auth.DigestAuthentication
          extended by com.dyuproject.web.auth.SmartDigestAuthentication

public class SmartDigestAuthentication
extends DigestAuthentication

Web authorization using MD5 digest with expiry and prevents session hi-jacking

Author:
David Yu
Date created:
Jul 1, 2008

Field Summary
 
Fields inherited from class com.dyuproject.web.auth.DigestAuthentication
TYPE
 
Fields inherited from class com.dyuproject.web.auth.Authentication
AUTHORIZATION, PASSWORD, REALM, USERNAME, WWW_AUTHENTICATE
 
Constructor Summary
SmartDigestAuthentication(CredentialSource credentialSource, String secretKey)
           
SmartDigestAuthentication(CredentialSource credentialSource, String secretKey, int maxAgeSeconds)
           
 
Method Summary
protected  boolean check(String username, String password, String realm, String nonce, String nc, String cnonce, String qop, String uri, String response, HttpServletRequest request)
           
protected  String newNonce(HttpServletRequest request)
           
 
Methods inherited from class com.dyuproject.web.auth.DigestAuthentication
authenticate, getType, sendChallenge
 
Methods inherited from class com.dyuproject.web.auth.Authentication
getCredentialSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmartDigestAuthentication

public SmartDigestAuthentication(CredentialSource credentialSource,
                                 String secretKey)

SmartDigestAuthentication

public SmartDigestAuthentication(CredentialSource credentialSource,
                                 String secretKey,
                                 int maxAgeSeconds)
Method Detail

newNonce

protected String newNonce(HttpServletRequest request)
Overrides:
newNonce in class DigestAuthentication

check

protected boolean check(String username,
                        String password,
                        String realm,
                        String nonce,
                        String nc,
                        String cnonce,
                        String qop,
                        String uri,
                        String response,
                        HttpServletRequest request)
Overrides:
check in class DigestAuthentication


Copyright © 2008-2013. All Rights Reserved.