edu.yale.its.tp.cas.client.filter
Class SimpleCASAuthorizationFilter

java.lang.Object
  extended by edu.yale.its.tp.cas.client.filter.SimpleCASAuthorizationFilter
All Implemented Interfaces:
javax.servlet.Filter

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

Filter protects resources such that only specified usernames, as authenticated with CAS, can access.

edu.yale.its.tp.cas.client.filter.user must be set before this filter in the filter chain.

This filter takes the init-param edu.yale.its.tp.cas.client.filter.authorizedUsers, a whitespace-delimited list of users authorized to pass through this filter.

Author:
Andrew Petro

Field Summary
static java.lang.String AUTHORIZED_USER_STRING
           
static java.lang.String FILTER_NAME
           
 
Constructor Summary
SimpleCASAuthorizationFilter()
           
 
Method Summary
 void destroy()
           
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain fc)
           
 void init(javax.servlet.FilterConfig config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTHORIZED_USER_STRING

public static final java.lang.String AUTHORIZED_USER_STRING
See Also:
Constant Field Values

FILTER_NAME

public static final java.lang.String FILTER_NAME
See Also:
Constant Field Values
Constructor Detail

SimpleCASAuthorizationFilter

public SimpleCASAuthorizationFilter()
Method Detail

init

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

doFilter

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

destroy

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