Search in sources :

Example 1 with GoogleAuthenticatorAccountCouchDbRepository

use of org.apereo.cas.couchdb.gauth.credential.GoogleAuthenticatorAccountCouchDbRepository in project cas by apereo.

the class GoogleAuthenticatorCouchDbConfiguration method couchDbOneTimeTokenAccountRepository.

@ConditionalOnMissingBean(name = "couchDbOneTimeTokenAccountRepository")
@Bean
@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
public GoogleAuthenticatorAccountCouchDbRepository couchDbOneTimeTokenAccountRepository(@Qualifier("oneTimeTokenAccountCouchDbFactory") final CouchDbConnectorFactory oneTimeTokenCouchDbFactory, final CasConfigurationProperties casProperties) {
    val repository = new GoogleAuthenticatorAccountCouchDbRepository(oneTimeTokenCouchDbFactory.getCouchDbConnector(), casProperties.getAuthn().getMfa().getGauth().getCouchDb().isCreateIfNotExists());
    repository.initStandardDesignDocument();
    return repository;
}
Also used : lombok.val(lombok.val) GoogleAuthenticatorAccountCouchDbRepository(org.apereo.cas.couchdb.gauth.credential.GoogleAuthenticatorAccountCouchDbRepository) 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

lombok.val (lombok.val)1 GoogleAuthenticatorAccountCouchDbRepository (org.apereo.cas.couchdb.gauth.credential.GoogleAuthenticatorAccountCouchDbRepository)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