use of org.apereo.cas.adaptors.u2f.storage.U2FJpaDeviceRepository in project cas by apereo.
the class U2FJpaConfiguration method u2fDeviceRepository.
@Bean
public U2FDeviceRepository u2fDeviceRepository() {
final U2FMultifactorProperties u2f = casProperties.getAuthn().getMfa().getU2f();
final LoadingCache<String, String> requestStorage = Caffeine.newBuilder().expireAfterWrite(u2f.getExpireRegistrations(), u2f.getExpireRegistrationsTimeUnit()).build(key -> StringUtils.EMPTY);
final U2FJpaDeviceRepository repo = new U2FJpaDeviceRepository(requestStorage, u2f.getExpireRegistrations(), u2f.getExpireDevicesTimeUnit());
repo.setCipherExecutor(this.u2fRegistrationRecordCipherExecutor);
return repo;
}
Aggregations