winstone.auth
Class BasicAuthenticationHandler

java.lang.Object
  extended by winstone.auth.BaseAuthenticationHandler
      extended by winstone.auth.BasicAuthenticationHandler
All Implemented Interfaces:
AuthenticationHandler

public class BasicAuthenticationHandler
extends BaseAuthenticationHandler

Handles HTTP basic authentication.

Version:
$Id: BasicAuthenticationHandler.java,v 1.5 2007/04/11 13:14:26 rickknowles Exp $
Author:
mailto: Rick Knowles

Field Summary
 
Fields inherited from class winstone.auth.BaseAuthenticationHandler
AUTH_RESOURCES, constraints, realm, realmName
 
Constructor Summary
BasicAuthenticationHandler(org.w3c.dom.Node loginConfigNode, java.util.List constraintNodes, java.util.Set rolesAllowed, AuthenticationRealm realm)
           
 
Method Summary
static int decodeBase64(char[] input, byte[] output, int inOffset, int inLength, int outOffset)
          Decodes a byte array from base64
protected  void requestAuthentication(HttpServletRequest request, HttpServletResponse response, java.lang.String pathRequested)
          Call this once we know that we need to authenticate
protected  boolean validatePossibleAuthenticationResponse(HttpServletRequest request, HttpServletResponse response, java.lang.String pathRequested)
          Handling the (possible) response
 
Methods inherited from class winstone.auth.BaseAuthenticationHandler
doRoleCheck, processAuthentication, setNoCache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicAuthenticationHandler

public BasicAuthenticationHandler(org.w3c.dom.Node loginConfigNode,
                                  java.util.List constraintNodes,
                                  java.util.Set rolesAllowed,
                                  AuthenticationRealm realm)
Method Detail

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
Throws:
java.io.IOException

decodeBase64

public static int decodeBase64(char[] input,
                               byte[] output,
                               int inOffset,
                               int inLength,
                               int outOffset)
Decodes a byte array from base64



Copyright © 2013. All Rights Reserved.