use of org.apereo.cas.configuration.model.support.generic.AcceptAuthenticationProperties in project cas by apereo.
the class CasCoreAuthenticationHandlersConfiguration method acceptUsersAuthenticationHandler.
@RefreshScope
@Bean
public AuthenticationHandler acceptUsersAuthenticationHandler() {
final AcceptAuthenticationProperties acceptAuthenticationProperties = casProperties.getAuthn().getAccept();
final HashMap<String, String> users = new HashMap<>();
final AcceptUsersAuthenticationHandler h = new AcceptUsersAuthenticationHandler(acceptAuthenticationProperties.getName(), servicesManager, acceptUsersPrincipalFactory(), null, users);
h.setUsers(getParsedUsers());
h.setPasswordEncoder(Beans.newPasswordEncoder(acceptAuthenticationProperties.getPasswordEncoder()));
if (acceptPasswordPolicyConfiguration != null) {
h.setPasswordPolicyConfiguration(acceptPasswordPolicyConfiguration);
}
h.setPrincipalNameTransformer(Beans.newPrincipalNameTransformer(acceptAuthenticationProperties.getPrincipalTransformation()));
return h;
}
Aggregations