Search in sources :

Example 1 with SurrogateLdapAuthenticationService

use of org.apereo.cas.authentication.surrogate.SurrogateLdapAuthenticationService in project cas by apereo.

the class SurrogateLdapAuthenticationConfiguration method surrogateAuthenticationService.

@RefreshScope
@Bean
public SurrogateAuthenticationService surrogateAuthenticationService() {
    final SurrogateAuthenticationProperties su = casProperties.getAuthn().getSurrogate();
    LOGGER.debug("Using LDAP [{}] with baseDn [{}] to locate surrogate accounts", su.getLdap().getLdapUrl(), su.getLdap().getBaseDn());
    final ConnectionFactory factory = LdapUtils.newLdaptivePooledConnectionFactory(su.getLdap());
    return new SurrogateLdapAuthenticationService(factory, su.getLdap(), servicesManager);
}
Also used : ConnectionFactory(org.ldaptive.ConnectionFactory) SurrogateAuthenticationProperties(org.apereo.cas.configuration.model.support.surrogate.SurrogateAuthenticationProperties) SurrogateLdapAuthenticationService(org.apereo.cas.authentication.surrogate.SurrogateLdapAuthenticationService) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) Bean(org.springframework.context.annotation.Bean)

Aggregations

SurrogateLdapAuthenticationService (org.apereo.cas.authentication.surrogate.SurrogateLdapAuthenticationService)1 SurrogateAuthenticationProperties (org.apereo.cas.configuration.model.support.surrogate.SurrogateAuthenticationProperties)1 ConnectionFactory (org.ldaptive.ConnectionFactory)1 RefreshScope (org.springframework.cloud.context.config.annotation.RefreshScope)1 Bean (org.springframework.context.annotation.Bean)1