au.com.lastweekend.htaccess
Class HttpHtAccessCallback

java.lang.Object
  extended by au.com.lastweekend.htaccess.HttpHtAccessCallback
All Implemented Interfaces:
HtAccessProcessor.HtAccessCallback

public abstract class HttpHtAccessCallback
extends java.lang.Object
implements HtAccessProcessor.HtAccessCallback

Provides simple Http integration with HtAccessProcessor

Version:
$Id$
Author:
Grant Gardner grant@lastweekend.com.au

Field Summary
protected static org.slf4j.Logger LOG
           
 
Method Summary
 java.util.Set<java.lang.String> getAuthenticatedGroups()
           
 java.lang.String getAuthenticatedUser()
           
 java.lang.String getCredentials()
           
 java.lang.String getMethod()
           
 java.lang.String getPathInContext()
           
 java.lang.String getRemoteAddr()
           
 java.lang.String getRemoteHost()
           
 boolean isHandled()
           
 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
protected  void setHandled()
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface au.com.lastweekend.htaccess.HtAccessProcessor.HtAccessCallback
findResource
 

Field Detail

LOG

protected static final org.slf4j.Logger LOG
Method Detail

getCredentials

public java.lang.String getCredentials()
Specified by:
getCredentials in interface HtAccessProcessor.HtAccessCallback
Returns:
the base64 encoded credentials.

getMethod

public java.lang.String getMethod()
Specified by:
getMethod in interface HtAccessProcessor.HtAccessCallback
Returns:
HttpMethod eg "GET, POST" etc of the request

getPathInContext

public java.lang.String getPathInContext()
Specified by:
getPathInContext in interface HtAccessProcessor.HtAccessCallback
Returns:
the request path

getRemoteHost

public java.lang.String getRemoteHost()
Specified by:
getRemoteHost in interface HtAccessProcessor.HtAccessCallback
Returns:
the remote host name of the request

getRemoteAddr

public java.lang.String getRemoteAddr()
Specified by:
getRemoteAddr in interface HtAccessProcessor.HtAccessCallback
Returns:
the remote IP address

setHandled

protected void setHandled()

isHandled

public final boolean isHandled()

setForbidden

public void setForbidden()
Description copied from interface: HtAccessProcessor.HtAccessCallback
Called if the request is to be rejected

Specified by:
setForbidden in interface HtAccessProcessor.HtAccessCallback

setRequiresAuthentication

public void setRequiresAuthentication(java.lang.String realmName)
Description copied from interface: HtAccessProcessor.HtAccessCallback
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.

Specified by:
setRequiresAuthentication in interface HtAccessProcessor.HtAccessCallback
Parameters:
realmName - The Basic authentication realm that the htaccess file belongs to.

setAuthenticatedUser

public void setAuthenticatedUser(java.lang.String user,
                                 java.util.Set<java.lang.String> groups)
Description copied from interface: HtAccessProcessor.HtAccessCallback
Called when user has been authenticated

Specified by:
setAuthenticatedUser in interface HtAccessProcessor.HtAccessCallback

getAuthenticatedUser

public java.lang.String getAuthenticatedUser()

getAuthenticatedGroups

public java.util.Set<java.lang.String> getAuthenticatedGroups()


Copyright © 2008. All Rights Reserved.