au.com.lastweekend.htaccess
Interface HtAccessProcessor.HtAccessCallback

All Known Implementing Classes:
HttpHtAccessCallback
Enclosing class:
HtAccessProcessor

public static interface HtAccessProcessor.HtAccessCallback

This interface is used to mediate between the container and the authentication and authorisation process


Method Summary
 java.net.URL findResource(java.lang.String htPath, boolean checkAbsolutePath)
          Find a resource in the context of this request.
 java.lang.String getCredentials()
           
 java.lang.String getMethod()
           
 java.lang.String getPathInContext()
           
 java.lang.String getRemoteAddr()
           
 java.lang.String getRemoteHost()
           
 void setAuthenticatedUser(java.lang.String user, java.util.Set<java.lang.String> groups)
          Called when user has been authenticated
 void setForbidden()
          Called if the request is to be rejected
 void setRequiresAuthentication(java.lang.String realmName)
          Called when user authentication is required but there were no user credentials in the request or the user/password did not match, or the user had insufficient rights.
 

Method Detail

getPathInContext

java.lang.String getPathInContext()
Returns:
the request path

getCredentials

java.lang.String getCredentials()
Returns:
the base64 encoded credentials.

findResource

java.net.URL findResource(java.lang.String htPath,
                          boolean checkAbsolutePath)
Find a resource in the context of this request. Used to find the .htaccess file and the files referred to by AuthUserFile and AuthGroupFile The .htaccess file is always a path in the same context as the request (checkAbsolutePath = false) while the latter two could be a context path or could be an absolute file-system path (checkAbsolutePath = true)

Parameters:
htPath - - expected to begin with "/"
checkAbsolutePath -
Returns:
a URL of the supplied path in the processing container, null if not found

getMethod

java.lang.String getMethod()
Returns:
HttpMethod eg "GET, POST" etc of the request

getRemoteHost

java.lang.String getRemoteHost()
Returns:
the remote host name of the request

getRemoteAddr

java.lang.String getRemoteAddr()
Returns:
the remote IP address

setForbidden

void setForbidden()
Called if the request is to be rejected


setAuthenticatedUser

void setAuthenticatedUser(java.lang.String user,
                          java.util.Set<java.lang.String> groups)
Called when user has been authenticated

Parameters:
user -
groups -

setRequiresAuthentication

void setRequiresAuthentication(java.lang.String realmName)
Called when user authentication is required but there were no user credentials in the request or the user/password did not match, or the user had insufficient rights.

Parameters:
realmName - The Basic authentication realm that the htaccess file belongs to.


Copyright © 2008. All Rights Reserved.