use of org.apereo.cas.support.wsfederation.authentication.handler.support.WsFederationAuthenticationHandler in project cas by apereo.
the class WsFedAuthenticationEventExecutionPlanConfiguration method wsfedAuthenticationEventExecutionPlanConfigurer.
@ConditionalOnMissingBean(name = "wsfedAuthenticationEventExecutionPlanConfigurer")
@Bean
public AuthenticationEventExecutionPlanConfigurer wsfedAuthenticationEventExecutionPlanConfigurer() {
return plan -> casProperties.getAuthn().getWsfed().stream().filter(wsfed -> StringUtils.isNotBlank(wsfed.getIdentityProviderUrl()) && StringUtils.isNotBlank(wsfed.getIdentityProviderIdentifier())).forEach(wsfed -> {
final AuthenticationHandler handler = new WsFederationAuthenticationHandler(wsfed.getName(), servicesManager, adfsPrincipalFactory());
if (!wsfed.isAttributeResolverEnabled()) {
plan.registerAuthenticationHandler(handler);
} else {
final WsFederationCredentialsToPrincipalResolver r = new WsFederationCredentialsToPrincipalResolver(attributeRepository, adfsPrincipalFactory(), wsfed.getPrincipal().isReturnNull(), wsfed.getPrincipal().getPrincipalAttribute(), getWsFederationConfiguration(wsfed));
plan.registerAuthenticationHandlerWithPrincipalResolver(handler, r);
}
});
}
Aggregations