use of org.apereo.cas.configuration.model.support.jaas.JaasAuthenticationProperties in project cas by apereo.
the class CasCoreAuthenticationHandlersConfiguration method jaasAuthenticationHandler.
@RefreshScope
@Bean
public AuthenticationHandler jaasAuthenticationHandler() {
final JaasAuthenticationProperties jaas = casProperties.getAuthn().getJaas();
final JaasAuthenticationHandler h = new JaasAuthenticationHandler(jaas.getName(), servicesManager, jaasPrincipalFactory(), null);
h.setKerberosKdcSystemProperty(jaas.getKerberosKdcSystemProperty());
h.setKerberosRealmSystemProperty(jaas.getKerberosRealmSystemProperty());
h.setRealm(jaas.getRealm());
h.setPasswordEncoder(Beans.newPasswordEncoder(jaas.getPasswordEncoder()));
if (jaasPasswordPolicyConfiguration != null) {
h.setPasswordPolicyConfiguration(jaasPasswordPolicyConfiguration);
}
h.setPrincipalNameTransformer(Beans.newPrincipalNameTransformer(jaas.getPrincipalTransformation()));
return h;
}
Aggregations