Search in sources :

Example 1 with ModuleWebSecurityConfiguration

use of com.evolveum.midpoint.authentication.api.ModuleWebSecurityConfiguration in project midpoint by Evolveum.

the class HttpClusterModuleFactory method createModuleFilter.

@Override
public AuthModule createModuleFilter(AbstractAuthenticationModuleType moduleType, String sequenceSuffix, ServletRequest request, Map<Class<?>, Object> sharedObjects, AuthenticationModulesType authenticationsPolicy, CredentialsPolicyType credentialPolicy, AuthenticationChannel authenticationChannel) throws Exception {
    ModuleWebSecurityConfiguration configuration = createConfiguration(moduleType, sequenceSuffix);
    configuration.addAuthenticationProvider(createProvider());
    HttpClusterModuleWebSecurityConfigurer<ModuleWebSecurityConfiguration> module = createModule(configuration);
    HttpSecurity http = getNewHttpSecurity(module);
    setSharedObjects(http, sharedObjects);
    ModuleAuthenticationImpl moduleAuthentication = createEmptyModuleAuthentication(configuration);
    SecurityFilterChain filter = http.build();
    return AuthModuleImpl.build(filter, configuration, moduleAuthentication);
}
Also used : SecurityFilterChain(org.springframework.security.web.SecurityFilterChain) ModuleWebSecurityConfiguration(com.evolveum.midpoint.authentication.api.ModuleWebSecurityConfiguration) ModuleAuthenticationImpl(com.evolveum.midpoint.authentication.impl.module.authentication.ModuleAuthenticationImpl) HttpSecurity(org.springframework.security.config.annotation.web.builders.HttpSecurity)

Aggregations

ModuleWebSecurityConfiguration (com.evolveum.midpoint.authentication.api.ModuleWebSecurityConfiguration)1 ModuleAuthenticationImpl (com.evolveum.midpoint.authentication.impl.module.authentication.ModuleAuthenticationImpl)1 HttpSecurity (org.springframework.security.config.annotation.web.builders.HttpSecurity)1 SecurityFilterChain (org.springframework.security.web.SecurityFilterChain)1