Search in sources :

Example 1 with CouchbaseAuthenticationHandler

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;
}
Also used : CouchbaseAuthenticationHandler(org.apereo.cas.authentication.CouchbaseAuthenticationHandler) CouchbaseAuthenticationProperties(org.apereo.cas.configuration.model.support.couchbase.authentication.CouchbaseAuthenticationProperties) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

CouchbaseAuthenticationHandler (org.apereo.cas.authentication.CouchbaseAuthenticationHandler)1 CouchbaseAuthenticationProperties (org.apereo.cas.configuration.model.support.couchbase.authentication.CouchbaseAuthenticationProperties)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 RefreshScope (org.springframework.cloud.context.config.annotation.RefreshScope)1 Bean (org.springframework.context.annotation.Bean)1