/**
* Clean up expired records.
*/
@Scheduled(initialDelayString = "${cas.authn.mfa.trusted.cleaner.startDelay:PT10S}",
fixedDelayString = "${cas.authn.mfa.trusted.cleaner.repeatInterval:PT60S}")
public void clean() {
if (!trustedProperties.getCleaner().isEnabled()) {
LOGGER.debug("[{}] is disabled. Expired trusted authentication records will not automatically be cleaned up by CAS",
getClass().getName());
return;
}
try {
LOGGER.debug("Proceeding to clean up expired trusted authentication records...");
SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
final LocalDate validDate = LocalDate.now().minus(trustedProperties.getExpiration(),
DateTimeUtils.toChronoUnit(trustedProperties.getTimeUnit()));
LOGGER.info("Expiring records that are on/before [{}]", validDate);
this.storage.expire(validDate);
} catch (final Exception e) {
LOGGER.error(e.getMessage(), e);
}
}
MultifactorAuthenticationTrustStorageCleaner.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:cas-5.1.0
作者:
评论列表
文章目录