Search in sources :

Example 1 with ChannelProcessor

use of org.springframework.security.web.access.channel.ChannelProcessor in project spring-security by spring-projects.

the class ChannelSecurityConfigurer method getChannelProcessors.

private List<ChannelProcessor> getChannelProcessors(H http) {
    if (channelProcessors != null) {
        return channelProcessors;
    }
    InsecureChannelProcessor insecureChannelProcessor = new InsecureChannelProcessor();
    SecureChannelProcessor secureChannelProcessor = new SecureChannelProcessor();
    PortMapper portMapper = http.getSharedObject(PortMapper.class);
    if (portMapper != null) {
        RetryWithHttpEntryPoint httpEntryPoint = new RetryWithHttpEntryPoint();
        httpEntryPoint.setPortMapper(portMapper);
        insecureChannelProcessor.setEntryPoint(httpEntryPoint);
        RetryWithHttpsEntryPoint httpsEntryPoint = new RetryWithHttpsEntryPoint();
        httpsEntryPoint.setPortMapper(portMapper);
        secureChannelProcessor.setEntryPoint(httpsEntryPoint);
    }
    insecureChannelProcessor = postProcess(insecureChannelProcessor);
    secureChannelProcessor = postProcess(secureChannelProcessor);
    return Arrays.<ChannelProcessor>asList(insecureChannelProcessor, secureChannelProcessor);
}
Also used : SecureChannelProcessor(org.springframework.security.web.access.channel.SecureChannelProcessor) RetryWithHttpsEntryPoint(org.springframework.security.web.access.channel.RetryWithHttpsEntryPoint) PortMapper(org.springframework.security.web.PortMapper) RetryWithHttpEntryPoint(org.springframework.security.web.access.channel.RetryWithHttpEntryPoint) InsecureChannelProcessor(org.springframework.security.web.access.channel.InsecureChannelProcessor) InsecureChannelProcessor(org.springframework.security.web.access.channel.InsecureChannelProcessor) SecureChannelProcessor(org.springframework.security.web.access.channel.SecureChannelProcessor) ChannelProcessor(org.springframework.security.web.access.channel.ChannelProcessor)

Aggregations

PortMapper (org.springframework.security.web.PortMapper)1 ChannelProcessor (org.springframework.security.web.access.channel.ChannelProcessor)1 InsecureChannelProcessor (org.springframework.security.web.access.channel.InsecureChannelProcessor)1 RetryWithHttpEntryPoint (org.springframework.security.web.access.channel.RetryWithHttpEntryPoint)1 RetryWithHttpsEntryPoint (org.springframework.security.web.access.channel.RetryWithHttpsEntryPoint)1 SecureChannelProcessor (org.springframework.security.web.access.channel.SecureChannelProcessor)1