Search in sources :

Example 1 with MidpointFilterChainProxy

use of com.evolveum.midpoint.authentication.impl.filter.MidpointFilterChainProxy in project midpoint by Evolveum.

the class MidpointWebSecurityConfiguration method springSecurityFilterChain.

@Override
public Filter springSecurityFilterChain() throws Exception {
    Filter filter = super.springSecurityFilterChain();
    if (filter instanceof FilterChainProxy) {
        List<SecurityFilterChain> filters;
        if (!((FilterChainProxy) filter).getFilterChains().isEmpty()) {
            filters = new ArrayList<SecurityFilterChain>();
            filters.addAll(((FilterChainProxy) filter).getFilterChains());
        // filters.remove(filters.size() - 1);
        } else {
            filters = ((FilterChainProxy) filter).getFilterChains();
        }
        MidpointFilterChainProxy mpFilter = objectObjectPostProcessor.postProcess(new MidpointFilterChainProxy(filters));
        if (firewall != null) {
            mpFilter.setFirewall(firewall);
        }
        mpFilter.afterPropertiesSet();
        return mpFilter;
    }
    return filter;
}
Also used : SecurityFilterChain(org.springframework.security.web.SecurityFilterChain) FilterChainProxy(org.springframework.security.web.FilterChainProxy) MidpointFilterChainProxy(com.evolveum.midpoint.authentication.impl.filter.MidpointFilterChainProxy) Filter(javax.servlet.Filter) MidpointFilterChainProxy(com.evolveum.midpoint.authentication.impl.filter.MidpointFilterChainProxy)

Aggregations

MidpointFilterChainProxy (com.evolveum.midpoint.authentication.impl.filter.MidpointFilterChainProxy)1 Filter (javax.servlet.Filter)1 FilterChainProxy (org.springframework.security.web.FilterChainProxy)1 SecurityFilterChain (org.springframework.security.web.SecurityFilterChain)1