org.jasig.cas.web.support
Class AbstractInMemoryThrottledSubmissionHandlerInterceptorAdapter

java.lang.Object
  extended by org.springframework.web.servlet.handler.HandlerInterceptorAdapter
      extended by org.jasig.cas.web.support.AbstractThrottledSubmissionHandlerInterceptorAdapter
          extended by org.jasig.cas.web.support.AbstractInMemoryThrottledSubmissionHandlerInterceptorAdapter
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, org.springframework.web.servlet.HandlerInterceptor
Direct Known Subclasses:
InMemoryThrottledSubmissionByIpAddressAndUsernameHandlerInterceptorAdapter, InMemoryThrottledSubmissionByIpAddressHandlerInterceptorAdapter

public abstract class AbstractInMemoryThrottledSubmissionHandlerInterceptorAdapter
extends AbstractThrottledSubmissionHandlerInterceptorAdapter

Implementation of a HandlerInterceptorAdapter that keeps track of a mapping of IP Addresses to number of failures to authenticate.

Note, this class relies on an external method for decrementing the counts (i.e. a Quartz Job) and runs independent of the threshold of the parent.

Since:
3.0.5
Version:
$Revision$ $Date$
Author:
Scott Battaglia

Field Summary
 
Fields inherited from class org.jasig.cas.web.support.AbstractThrottledSubmissionHandlerInterceptorAdapter
log
 
Constructor Summary
AbstractInMemoryThrottledSubmissionHandlerInterceptorAdapter()
           
 
Method Summary
protected abstract  String constructKey(javax.servlet.http.HttpServletRequest request)
           
 void decrementCounts()
          This class relies on an external configuration to clean it up.
protected  boolean exceedsThreshold(javax.servlet.http.HttpServletRequest request)
           
protected  void recordSubmissionFailure(javax.servlet.http.HttpServletRequest request)
           
 
Methods inherited from class org.jasig.cas.web.support.AbstractThrottledSubmissionHandlerInterceptorAdapter
afterPropertiesSet, getFailureRangeInSeconds, getFailureThreshold, getThresholdRate, getUsernameParameter, postHandle, preHandle, recordThrottle, setFailureRangeInSeconds, setFailureThreshold, setUsernameParameter
 
Methods inherited from class org.springframework.web.servlet.handler.HandlerInterceptorAdapter
afterCompletion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractInMemoryThrottledSubmissionHandlerInterceptorAdapter

public AbstractInMemoryThrottledSubmissionHandlerInterceptorAdapter()
Method Detail

exceedsThreshold

protected final boolean exceedsThreshold(javax.servlet.http.HttpServletRequest request)
Specified by:
exceedsThreshold in class AbstractThrottledSubmissionHandlerInterceptorAdapter

recordSubmissionFailure

protected final void recordSubmissionFailure(javax.servlet.http.HttpServletRequest request)
Specified by:
recordSubmissionFailure in class AbstractThrottledSubmissionHandlerInterceptorAdapter

constructKey

protected abstract String constructKey(javax.servlet.http.HttpServletRequest request)

decrementCounts

public final void decrementCounts()
This class relies on an external configuration to clean it up. It ignores the threshold data in the parent class.



Copyright © 2004-2013 Jasig. All Rights Reserved.