use of org.apereo.cas.web.security.CasJdbcUserDetailsManagerConfigurer in project cas by apereo.
the class CasWebApplicationSecurityConfiguration method init.
@Override
public void init(final AuthenticationManagerBuilder auth) throws Exception {
if (StringUtils.isNotBlank(casProperties.getAdminPagesSecurity().getJdbc().getQuery())) {
auth.apply(new CasJdbcUserDetailsManagerConfigurer(casProperties.getAdminPagesSecurity()));
}
if (isLdapAuthorizationActive()) {
auth.apply(new CasLdapUserDetailsManagerConfigurer<>(casProperties.getAdminPagesSecurity()));
}
final AdminPagesSecurityProperties.Jaas jaas = casProperties.getAdminPagesSecurity().getJaas();
if (jaas.getLoginConfig() != null) {
final JaasAuthenticationProvider p = new JaasAuthenticationProvider();
p.setLoginConfig(jaas.getLoginConfig());
p.setLoginContextName(jaas.getLoginContextName());
p.setRefreshConfigurationOnStartup(jaas.isRefreshConfigurationOnStartup());
auth.authenticationProvider(p);
}
}
Aggregations