@Component(value="inspektrIpAddressUsernameThrottle") public class InspektrThrottledSubmissionByIpAddressAndUsernameHandlerInterceptorAdapter extends AbstractThrottledSubmissionHandlerInterceptorAdapter
Defines a new Inspektr Action "THROTTLED_LOGIN_ATTEMPT" which keeps track of failed login attempts that don't result in AUTHENTICATION_FAILED methods
This relies on the default Inspektr table layout and username construction. The username construction can be overridden in a subclass.
logger| Constructor and Description |
|---|
InspektrThrottledSubmissionByIpAddressAndUsernameHandlerInterceptorAdapter()
Instantiates a new Inspektr throttled submission by ip address and username handler interceptor adapter.
|
InspektrThrottledSubmissionByIpAddressAndUsernameHandlerInterceptorAdapter(org.jasig.inspektr.audit.AuditTrailManager auditTrailManager,
javax.sql.DataSource dataSource)
Instantiates a new inspektr throttled submission by ip address and username handler interceptor adapter.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
constructUsername(javax.servlet.http.HttpServletRequest request,
java.lang.String usernameParameter)
Construct username from the request.
|
protected boolean |
exceedsThreshold(javax.servlet.http.HttpServletRequest request)
Determine whether threshold has been exceeded.
|
protected java.lang.String |
getName()
Gets name.
|
void |
init()
Init the jdbc template.
|
protected void |
recordSubmissionFailure(javax.servlet.http.HttpServletRequest request)
Record submission failure.
|
protected void |
recordThrottle(javax.servlet.http.HttpServletRequest request)
Record throttling event.
|
void |
setApplicationCode(java.lang.String applicationCode) |
void |
setAuthenticationFailureCode(java.lang.String authenticationFailureCode) |
afterPropertiesSet, getFailureRangeInSeconds, getFailureThreshold, getThresholdRate, getUsernameParameter, postHandle, preHandle, setFailureRangeInSeconds, setFailureThreshold, setUsernameParameter, toStringpublic InspektrThrottledSubmissionByIpAddressAndUsernameHandlerInterceptorAdapter()
public InspektrThrottledSubmissionByIpAddressAndUsernameHandlerInterceptorAdapter(org.jasig.inspektr.audit.AuditTrailManager auditTrailManager,
javax.sql.DataSource dataSource)
auditTrailManager - the audit trail managerdataSource - the data source@PostConstruct public void init()
protected boolean exceedsThreshold(javax.servlet.http.HttpServletRequest request)
AbstractThrottledSubmissionHandlerInterceptorAdapterexceedsThreshold in class AbstractThrottledSubmissionHandlerInterceptorAdapterrequest - the requestprotected void recordSubmissionFailure(javax.servlet.http.HttpServletRequest request)
AbstractThrottledSubmissionHandlerInterceptorAdapterrecordSubmissionFailure in class AbstractThrottledSubmissionHandlerInterceptorAdapterrequest - the requestprotected void recordThrottle(javax.servlet.http.HttpServletRequest request)
AbstractThrottledSubmissionHandlerInterceptorAdapterrecordThrottle in class AbstractThrottledSubmissionHandlerInterceptorAdapterrequest - the requestpublic final void setApplicationCode(java.lang.String applicationCode)
public final void setAuthenticationFailureCode(java.lang.String authenticationFailureCode)
protected java.lang.String constructUsername(javax.servlet.http.HttpServletRequest request,
java.lang.String usernameParameter)
request - the requestusernameParameter - the username parameterprotected java.lang.String getName()
AbstractThrottledSubmissionHandlerInterceptorAdaptergetName in class AbstractThrottledSubmissionHandlerInterceptorAdapter