use of com.evolveum.midpoint.xml.ns._public.common.common_3.LdapAuthenticationModuleType in project midpoint by Evolveum.
the class LdapModuleFactory method createModuleFilter.
@Override
public AuthModule createModuleFilter(AbstractAuthenticationModuleType moduleType, String sequenceSuffix, ServletRequest request, Map<Class<?>, Object> sharedObjects, AuthenticationModulesType authenticationsPolicy, CredentialsPolicyType credentialPolicy, AuthenticationChannel authenticationChannel) throws Exception {
if (!(moduleType instanceof LdapAuthenticationModuleType)) {
LOGGER.error("This factory support only LdapAuthenticationModuleType, but modelType is " + moduleType);
return null;
}
isSupportedChannel(authenticationChannel);
LdapModuleWebSecurityConfiguration configuration = LdapModuleWebSecurityConfiguration.build(moduleType, sequenceSuffix);
configuration.setSequenceSuffix(sequenceSuffix);
configuration.addAuthenticationProvider(getProvider((LdapAuthenticationModuleType) moduleType));
LdapWebSecurityConfigurer<LdapModuleWebSecurityConfiguration> module = createModule(configuration);
HttpSecurity http = getNewHttpSecurity(module);
setSharedObjects(http, sharedObjects);
ModuleAuthenticationImpl moduleAuthentication = createEmptyModuleAuthentication((LdapAuthenticationModuleType) moduleType, configuration);
SecurityFilterChain filter = http.build();
return AuthModuleImpl.build(filter, configuration, moduleAuthentication);
}
Aggregations