use of org.apereo.cas.authentication.CouchbaseAuthenticationHandler 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