com.xefer.rebel
Class AuthenticationFilter

java.lang.Object
  |
  +--com.xefer.rebel.AuthenticationFilter
All Implemented Interfaces:
Filter

public class AuthenticationFilter
extends Object
implements Filter

Catches all Exceptions and reports them


Field Summary
private  FilterConfig config
          standard filter configuration
(package private)  String location
          name of the storage location
(package private)  String xbel
          name of the xbel document
 
Constructor Summary
AuthenticationFilter()
           
 
Method Summary
 void destroy()
           
 void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
          Verifies the user and sets up the location of that user's document User is always null in this implementation
private  String getDocumentLocation(String user)
          Returns the fully-qualified location on the XBEL document
private  String getUser(HttpServletRequest request)
          Verifies that the user specified by the url is the same user that has provided authentication credentials.
 void init(FilterConfig config)
          initialization
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

config

private FilterConfig config
standard filter configuration

location

String location
name of the storage location

xbel

String xbel
name of the xbel document
Constructor Detail

AuthenticationFilter

public AuthenticationFilter()
Method Detail

destroy

public void destroy()
Specified by:
destroy in interface Filter

doFilter

public void doFilter(ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
              throws IOException,
                     ServletException
Verifies the user and sets up the location of that user's document User is always null in this implementation
Specified by:
doFilter in interface Filter

getDocumentLocation

private String getDocumentLocation(String user)
Returns the fully-qualified location on the XBEL document
Parameters:
user - name of the user. Always null in this implementation

getUser

private String getUser(HttpServletRequest request)
                throws ResourceException
Verifies that the user specified by the url is the same user that has provided authentication credentials. This only used in multi-user situations where the url has be rewritten by the apache mod_rewrite package to include the user name on the query string. This method is stubbed out for this impelentation and returns null
Parameters:
request - HttpServletRequest the servlet request

init

public void init(FilterConfig config)
          throws ServletException
initialization
Specified by:
init in interface Filter