use of org.apereo.cas.configuration.model.support.x509.X509Properties in project cas by apereo.
the class X509AuthenticationConfiguration method x509SubjectPrincipalResolver.
@Bean
@RefreshScope
public PrincipalResolver x509SubjectPrincipalResolver() {
final X509Properties x509 = casProperties.getAuthn().getX509();
final X509SubjectPrincipalResolver r = new X509SubjectPrincipalResolver(x509.getPrincipalDescriptor());
r.setAttributeRepository(attributeRepository);
r.setPrincipalAttributeName(x509.getPrincipal().getPrincipalAttribute());
r.setReturnNullIfNoAttributes(x509.getPrincipal().isReturnNull());
r.setPrincipalFactory(x509PrincipalFactory());
return r;
}
use of org.apereo.cas.configuration.model.support.x509.X509Properties in project cas by apereo.
the class X509AuthenticationConfiguration method crlDistributionPointRevocationChecker.
@Bean
public RevocationChecker crlDistributionPointRevocationChecker() {
final X509Properties x509 = casProperties.getAuthn().getX509();
final Cache cache = new Cache("CRL".concat(UUID.randomUUID().toString()), x509.getCacheMaxElementsInMemory(), x509.isCacheDiskOverflow(), x509.isCacheEternal(), x509.getCacheTimeToLiveSeconds(), x509.getCacheTimeToIdleSeconds());
return new CRLDistributionPointRevocationChecker(x509.isCheckAll(), getRevocationPolicy(x509.getCrlUnavailablePolicy()), getRevocationPolicy(x509.getCrlExpiredPolicy()), cache, crlFetcher(), x509.isThrowOnFetchFailure());
}
Aggregations