winstone.auth
Class DigestAuthenticationHandler
java.lang.Object
winstone.auth.BaseAuthenticationHandler
winstone.auth.DigestAuthenticationHandler
- All Implemented Interfaces:
- AuthenticationHandler
public class DigestAuthenticationHandler
- extends BaseAuthenticationHandler
Implements the MD5 digest version of authentication
- Version:
- $Id: DigestAuthenticationHandler.java,v 1.3 2004/05/22 06:53:45
rickknowles Exp $
- Author:
- Rick Knowles
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DigestAuthenticationHandler
public DigestAuthenticationHandler(org.w3c.dom.Node loginConfigNode,
java.util.List constraintNodes,
java.util.Set rolesAllowed,
AuthenticationRealm realm)
throws java.security.NoSuchAlgorithmException
- Throws:
java.security.NoSuchAlgorithmException
requestAuthentication
protected void requestAuthentication(HttpServletRequest request,
HttpServletResponse response,
java.lang.String pathRequested)
throws java.io.IOException
- Call this once we know that we need to authenticate
- Specified by:
requestAuthentication
in class BaseAuthenticationHandler
- Throws:
java.io.IOException
validatePossibleAuthenticationResponse
protected boolean validatePossibleAuthenticationResponse(HttpServletRequest request,
HttpServletResponse response,
java.lang.String pathRequested)
throws java.io.IOException
- Handling the (possible) response
- Specified by:
validatePossibleAuthenticationResponse
in class BaseAuthenticationHandler
- Returns:
- True if the request should continue, or false if we have
intercepted it
- Throws:
java.io.IOException
md5Encode
public java.lang.String md5Encode(java.lang.String input)
throws java.io.UnsupportedEncodingException
- Returns a hex encoded MD5 digested version of the input string
- Parameters:
input
- The string to encode
- Returns:
- MD5 digested, hex encoded version of the input
- Throws:
java.io.UnsupportedEncodingException
Copyright © 2013. All Rights Reserved.