use of org.apereo.cas.configuration.model.support.couchbase.authentication.CouchbaseAuthenticationProperties in project cas by apereo.
the class CouchbaseAuthenticationConfiguration method authenticationCouchbaseClientFactory.
@ConditionalOnMissingBean(name = "authenticationCouchbaseClientFactory")
@RefreshScope
@Bean
public CouchbaseClientFactory authenticationCouchbaseClientFactory() {
final CouchbaseAuthenticationProperties couchbase = casProperties.getAuthn().getCouchbase();
final Set<String> nodes = org.springframework.util.StringUtils.commaDelimitedListToSet(couchbase.getNodeSet());
return new CouchbaseClientFactory(nodes, couchbase.getBucket(), couchbase.getPassword());
}
use of org.apereo.cas.configuration.model.support.couchbase.authentication.CouchbaseAuthenticationProperties in project cas by apereo.
the class CouchbaseAuthenticationConfiguration method couchbaseAuthenticationHandler.
@ConditionalOnMissingBean(name = "couchbaseAuthenticationHandler")
@Bean
@RefreshScope
public AuthenticationHandler couchbaseAuthenticationHandler() {
final CouchbaseAuthenticationProperties couchbase = casProperties.getAuthn().getCouchbase();
final CouchbaseAuthenticationHandler handler = new CouchbaseAuthenticationHandler(servicesManager, couchbasePrincipalFactory(), authenticationCouchbaseClientFactory(), couchbase);
handler.setPrincipalNameTransformer(PrincipalNameTransformerUtils.newPrincipalNameTransformer(couchbase.getPrincipalTransformation()));
handler.setPasswordEncoder(PasswordEncoderUtils.newPasswordEncoder(couchbase.getPasswordEncoder()));
return handler;
}
Aggregations