use of org.apereo.cas.configuration.model.support.generic.JsonResourceAuthenticationProperties in project cas by apereo.
the class JsonResourceAuthenticationEventExecutionPlanConfiguration method jsonResourceAuthenticationHandler.
@RefreshScope
@Bean
public AuthenticationHandler jsonResourceAuthenticationHandler() {
final JsonResourceAuthenticationProperties jsonProps = casProperties.getAuthn().getJson();
final JsonResourceAuthenticationHandler h = new JsonResourceAuthenticationHandler(jsonProps.getName(), servicesManager, jsonPrincipalFactory(), null, jsonProps.getLocation());
h.setPasswordEncoder(PasswordEncoderUtils.newPasswordEncoder(jsonProps.getPasswordEncoder()));
if (jsonProps.getPasswordPolicy().isEnabled()) {
h.setPasswordPolicyConfiguration(new PasswordPolicyConfiguration(jsonProps.getPasswordPolicy()));
}
h.setPrincipalNameTransformer(PrincipalNameTransformerUtils.newPrincipalNameTransformer(jsonProps.getPrincipalTransformation()));
return h;
}
Aggregations