ikrs.httpd.resource
Class HypertextAccessHandler

java.lang.Object
  extended by ikrs.httpd.resource.HypertextAccessHandler

public class HypertextAccessHandler
extends java.lang.Object

This class reads and processes the .htaccess and .htpasswd configuration for resource access.


Constructor Summary
HypertextAccessHandler(CustomLogger logger, boolean strictMode)
          Create a new HypertextAccessHandler.
 
Method Summary
 boolean accessGranted(java.net.URI requestURI, HTTPHeaders headers, HypertextAccessFile htaccess, java.lang.String authMethod, java.util.Map<java.lang.String,BasicType> additionalSettings, java.util.Map<java.lang.String,BasicType> optionalReturnSettings)
          This method checks whether the passed user has .htaccess-driven access to teh given directory (the directory the .htaccess is located in).
 boolean isStrictMode()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HypertextAccessHandler

public HypertextAccessHandler(CustomLogger logger,
                              boolean strictMode)
Create a new HypertextAccessHandler.

Parameters:
logger - A logger to write log messages to.
strictMode - If set to true small errors or irregularities will _not_ be ignored while parsing the .htaccess or .htpasswd files.
Method Detail

isStrictMode

public boolean isStrictMode()

accessGranted

public boolean accessGranted(java.net.URI requestURI,
                             HTTPHeaders headers,
                             HypertextAccessFile htaccess,
                             java.lang.String authMethod,
                             java.util.Map<java.lang.String,BasicType> additionalSettings,
                             java.util.Map<java.lang.String,BasicType> optionalReturnSettings)
                      throws java.io.IOException,
                             MissingParamException,
                             ConfigurationException
This method checks whether the passed user has .htaccess-driven access to teh given directory (the directory the .htaccess is located in).

Parameters:
htaccessFile -
authMethod -
authUser -
authPassword -
Throws:
java.io.IOException
MissingParamException
ConfigurationException