fedora.server.security.servletfilters
Class BaseCaching

java.lang.Object
  extended by fedora.server.security.servletfilters.Base
      extended by fedora.server.security.servletfilters.FilterSetup
          extended by fedora.server.security.servletfilters.BaseContributing
              extended by fedora.server.security.servletfilters.BaseCaching
All Implemented Interfaces:
CacheElementPopulator, javax.servlet.Filter
Direct Known Subclasses:
FilterLdap, FilterPubcookie, FilterXmlUserfile

public abstract class BaseCaching
extends BaseContributing
implements CacheElementPopulator

Author:
Bill Niebel (niebel@virginia.edu)

Field Summary
 java.lang.String AUTHENTICATE_KEY
           
 java.lang.String AUTHENTICATED_USER_KEY
           
static java.lang.String AUTHN_FAILURE_TIMEOUT_DURATION_KEY
           
static java.lang.String AUTHN_FAILURE_TIMEOUT_UNIT_KEY
           
protected static org.apache.commons.logging.Log log
           
static java.lang.String LOOKUP_EXCEPTION_TIMEOUT_DURATION_KEY
           
static java.lang.String LOOKUP_EXCEPTION_TIMEOUT_UNIT_KEY
           
static java.lang.String LOOKUP_SUCCESS_TIMEOUT_DURATION_KEY
           
static java.lang.String LOOKUP_SUCCESS_TIMEOUT_UNIT_KEY
           
 java.lang.String SPONSORED_USER_KEY
           
protected  boolean SPONSORING
           
 
Fields inherited from class fedora.server.security.servletfilters.BaseContributing
AUTHENTICATE, EMPTY_ARRAY, EMPTY_MAP, EMPTY_RESULTS, EMPTY_RESULTS_KEY, FILTERS_CONTRIBUTING_AUTHENTICATED_ATTRIBUTES, FILTERS_CONTRIBUTING_SPONSORED_ATTRIBUTES, LOG_STACK_TRACES, LOG_STACK_TRACES_KEY, NULL_SET, PW_0, PW_0_KEY, PW_NULL, PW_NULL_KEY, SKIP_FILTER, SURROGATE_ATTRIBUTE, SURROGATE_ATTRIBUTE_KEY, SURROGATE_ROLE, SURROGATE_ROLE_KEY, UNAUTHENTICATE_USER_CONDITIONALLY, UNAUTHENTICATE_USER_UNCONDITIONALLY, USE_FILTER
 
Fields inherited from class fedora.server.security.servletfilters.FilterSetup
FILTER_NAME, inited, NOT_SET
 
Fields inherited from class fedora.server.security.servletfilters.Base
initErrors, StringArrayPrototype
 
Constructor Summary
BaseCaching()
           
 
Method Summary
protected  boolean authenticate(boolean alreadyAuthenticated)
           
 void authenticate(ExtendedHttpServletRequest extendedHttpServletRequest)
           
 void contributeAttributes(ExtendedHttpServletRequest extendedHttpServletRequest, java.lang.String userid, java.lang.String password)
           
 void contributeAuthenticatedAttributes(ExtendedHttpServletRequest extendedHttpServletRequest)
           
 void contributeSponsoredAttributes(ExtendedHttpServletRequest extendedHttpServletRequest)
           
 void destroy()
           
protected  Cache getCache(java.lang.String filterName)
           
protected  Cache getNewCache()
           
 void init(javax.servlet.FilterConfig filterConfig)
           
protected  void initThisSubclass(java.lang.String key, java.lang.String value)
           
 void populateCacheElement(CacheElement cacheElement, java.lang.String password)
           
 
Methods inherited from class fedora.server.security.servletfilters.BaseContributing
doThisSubclass
 
Methods inherited from class fedora.server.security.servletfilters.FilterSetup
doFilter, getFilterNameAbbrev, wrap
 
Methods inherited from class fedora.server.security.servletfilters.Base
booleanValue, enter, enterExit, exit, fail, format, format, format, getClassName, pass, passFail, showThrowable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log

SPONSORING

protected boolean SPONSORING

LOOKUP_SUCCESS_TIMEOUT_UNIT_KEY

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

LOOKUP_SUCCESS_TIMEOUT_DURATION_KEY

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

AUTHN_FAILURE_TIMEOUT_UNIT_KEY

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

AUTHN_FAILURE_TIMEOUT_DURATION_KEY

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

LOOKUP_EXCEPTION_TIMEOUT_UNIT_KEY

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

LOOKUP_EXCEPTION_TIMEOUT_DURATION_KEY

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

AUTHENTICATE_KEY

public java.lang.String AUTHENTICATE_KEY

AUTHENTICATED_USER_KEY

public java.lang.String AUTHENTICATED_USER_KEY

SPONSORED_USER_KEY

public java.lang.String SPONSORED_USER_KEY
Constructor Detail

BaseCaching

public BaseCaching()
Method Detail

getCache

protected final Cache getCache(java.lang.String filterName)

init

public void init(javax.servlet.FilterConfig filterConfig)
Specified by:
init in interface javax.servlet.Filter
Overrides:
init in class BaseContributing

destroy

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

getNewCache

protected Cache getNewCache()

initThisSubclass

protected void initThisSubclass(java.lang.String key,
                                java.lang.String value)
Overrides:
initThisSubclass in class BaseContributing

authenticate

protected boolean authenticate(boolean alreadyAuthenticated)
Specified by:
authenticate in class BaseContributing

authenticate

public void authenticate(ExtendedHttpServletRequest extendedHttpServletRequest)
                  throws java.lang.Exception
Specified by:
authenticate in class BaseContributing
Throws:
java.lang.Exception

contributeAttributes

public void contributeAttributes(ExtendedHttpServletRequest extendedHttpServletRequest,
                                 java.lang.String userid,
                                 java.lang.String password)
                          throws java.lang.Exception
Throws:
java.lang.Exception

contributeAuthenticatedAttributes

public void contributeAuthenticatedAttributes(ExtendedHttpServletRequest extendedHttpServletRequest)
                                       throws java.lang.Exception
Specified by:
contributeAuthenticatedAttributes in class BaseContributing
Throws:
java.lang.Exception

contributeSponsoredAttributes

public void contributeSponsoredAttributes(ExtendedHttpServletRequest extendedHttpServletRequest)
                                   throws java.lang.Exception
Specified by:
contributeSponsoredAttributes in class BaseContributing
Throws:
java.lang.Exception

populateCacheElement

public void populateCacheElement(CacheElement cacheElement,
                                 java.lang.String password)
Specified by:
populateCacheElement in interface CacheElementPopulator