use of org.apereo.cas.web.support.InspektrThrottledSubmissionByIpAddressAndUsernameHandlerInterceptorAdapter in project cas by apereo.
the class CasJdbcThrottlingConfiguration method authenticationThrottle.
@Autowired
@Bean
@RefreshScope
public ThrottledSubmissionHandlerInterceptor authenticationThrottle(@Qualifier("auditTrailManager") final AuditTrailManager auditTrailManager) {
final ThrottleProperties throttle = casProperties.getAuthn().getThrottle();
final String appcode = throttle.getAppcode();
final String sqlQueryAudit = throttle.getJdbc().getAuditQuery();
final ThrottleProperties.Failure failure = throttle.getFailure();
return new InspektrThrottledSubmissionByIpAddressAndUsernameHandlerInterceptorAdapter(failure.getThreshold(), failure.getRangeSeconds(), throttle.getUsernameParameter(), auditTrailManager, inspektrAuditTrailDataSource(), appcode, sqlQueryAudit, failure.getCode());
}
Aggregations