au.edu.archer.acegi.httpheader
Class HTTPHeadersFilter

java.lang.Object
  extended by au.edu.archer.acegi.httpheader.HTTPHeadersFilter
All Implemented Interfaces:
javax.servlet.Filter

public class HTTPHeadersFilter
extends java.lang.Object
implements javax.servlet.Filter

This is a very simple filter which captures a single header and uses is as a principal. ie, REMOTE_USER or CLIENT_DN Optionally uses a whitelist to determine if the user is "authorised"

Author:
Nigel Sim
See Also:
HTTPHeaderToken

Field Summary
protected  org.apache.log4j.Logger logger
           
 
Constructor Summary
HTTPHeadersFilter()
           
 
Method Summary
 void destroy()
           
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain filterChain)
           
 org.acegisecurity.GrantedAuthority[] getAuthorities(java.lang.String dn)
          Get a list of granted authorities by consulting the whitelist.
 java.lang.String getVariableName()
           
 java.lang.String getWhiteListFile()
           
 void init(javax.servlet.FilterConfig arg0)
           
 void setVariableName(java.lang.String variableName)
           
 void setWhiteListFile(java.lang.String whiteListFile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected org.apache.log4j.Logger logger
Constructor Detail

HTTPHeadersFilter

public HTTPHeadersFilter()
Method Detail

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Filter

doFilter

public void doFilter(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response,
                     javax.servlet.FilterChain filterChain)
              throws java.io.IOException,
                     javax.servlet.ServletException
Specified by:
doFilter in interface javax.servlet.Filter
Throws:
java.io.IOException
javax.servlet.ServletException

getAuthorities

public org.acegisecurity.GrantedAuthority[] getAuthorities(java.lang.String dn)
Get a list of granted authorities by consulting the whitelist.

Parameters:
dn -
Returns:

getVariableName

public java.lang.String getVariableName()

setVariableName

public void setVariableName(java.lang.String variableName)

getWhiteListFile

public java.lang.String getWhiteListFile()

setWhiteListFile

public void setWhiteListFile(java.lang.String whiteListFile)

init

public void init(javax.servlet.FilterConfig arg0)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Filter
Throws:
javax.servlet.ServletException


Copyright © 2008. All Rights Reserved.