use of org.apereo.cas.adaptors.generic.RejectUsersAuthenticationHandler in project cas by apereo.
the class RejectUsersAuthenticationEventExecutionPlanConfiguration method rejectUsersAuthenticationHandler.
@RefreshScope
@Bean
public AuthenticationHandler rejectUsersAuthenticationHandler() {
final RejectAuthenticationProperties rejectProperties = casProperties.getAuthn().getReject();
final Set<String> users = org.springframework.util.StringUtils.commaDelimitedListToSet(rejectProperties.getUsers());
final RejectUsersAuthenticationHandler h = new RejectUsersAuthenticationHandler(rejectProperties.getName(), servicesManager, rejectUsersPrincipalFactory(), users);
h.setPasswordEncoder(PasswordEncoderUtils.newPasswordEncoder(rejectProperties.getPasswordEncoder()));
if (rejectPasswordPolicyConfiguration != null) {
h.setPasswordPolicyConfiguration(rejectPasswordPolicyConfiguration);
}
h.setPrincipalNameTransformer(PrincipalNameTransformerUtils.newPrincipalNameTransformer(rejectProperties.getPrincipalTransformation()));
return h;
}
Aggregations