Java 类org.springframework.security.web.access.channel.ChannelProcessor 实例源码

项目:metaworks_framework    文件:ProtoChannelBeanPostProcessor.java   
@Override
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
    if (bean instanceof ChannelDecisionManagerImpl) {
        try {
            ChannelDecisionManagerImpl manager = (ChannelDecisionManagerImpl) bean;
            Field channelProcessors = manager.getClass().getDeclaredField("channelProcessors");
            channelProcessors.setAccessible(true);
            List<ChannelProcessor> list = (List<ChannelProcessor>) channelProcessors.get(manager);
            list.clear();
            manager.setChannelProcessors(channelProcessorOverrides);
            LOG.info("Replacing the standard Spring Security channel processors with custom processors that look for a " +
                    "'X-Forwarded-Proto' request header. This allows Spring Security to sit behind a load balancer with SSL termination.");
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
    return bean;
}
项目:SparkCommerce    文件:ProtoChannelBeanPostProcessor.java   
@Override
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
    if (bean instanceof ChannelDecisionManagerImpl) {
        try {
            ChannelDecisionManagerImpl manager = (ChannelDecisionManagerImpl) bean;
            Field channelProcessors = manager.getClass().getDeclaredField("channelProcessors");
            channelProcessors.setAccessible(true);
            List<ChannelProcessor> list = (List<ChannelProcessor>) channelProcessors.get(manager);
            list.clear();
            manager.setChannelProcessors(channelProcessorOverrides);
            LOG.info("Replacing the standard Spring Security channel processors with custom processors that look for a " +
                    "'X-Forwarded-Proto' request header. This allows Spring Security to sit behind a load balancer with SSL termination.");
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
    return bean;
}
项目:blcdemo    文件:ProtoChannelBeanPostProcessor.java   
@Override
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
    if (bean instanceof ChannelDecisionManagerImpl) {
        try {
            ChannelDecisionManagerImpl manager = (ChannelDecisionManagerImpl) bean;
            Field channelProcessors = manager.getClass().getDeclaredField("channelProcessors");
            channelProcessors.setAccessible(true);
            List<ChannelProcessor> list = (List<ChannelProcessor>) channelProcessors.get(manager);
            list.clear();
            manager.setChannelProcessors(channelProcessorOverrides);
            LOG.info("Replacing the standard Spring Security channel processors with custom processors that look for a " +
                    "'X-Forwarded-Proto' request header. This allows Spring Security to sit behind a load balancer with SSL termination.");
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
    return bean;
}
项目:metaworks_framework    文件:ProtoChannelBeanPostProcessor.java   
/**
 * @return the channelProcessors
 */
public List<ChannelProcessor> getChannelProcessorOverrides() {
    return channelProcessorOverrides;
}
项目:metaworks_framework    文件:ProtoChannelBeanPostProcessor.java   
/**
 * @param channelProcessors the channelProcessors to set
 */
public void setChannelProcessorOverrides(List<ChannelProcessor> channelProcessorOverrides) {
    this.channelProcessorOverrides = channelProcessorOverrides;
}
项目:SparkCommerce    文件:ProtoChannelBeanPostProcessor.java   
/**
 * @return the channelProcessors
 */
public List<ChannelProcessor> getChannelProcessorOverrides() {
    return channelProcessorOverrides;
}
项目:SparkCommerce    文件:ProtoChannelBeanPostProcessor.java   
/**
 * @param channelProcessors the channelProcessors to set
 */
public void setChannelProcessorOverrides(List<ChannelProcessor> channelProcessorOverrides) {
    this.channelProcessorOverrides = channelProcessorOverrides;
}
项目:blcdemo    文件:ProtoChannelBeanPostProcessor.java   
/**
 * @return the channelProcessors
 */
public List<ChannelProcessor> getChannelProcessorOverrides() {
    return channelProcessorOverrides;
}
项目:blcdemo    文件:ProtoChannelBeanPostProcessor.java   
/**
 * @param channelProcessors the channelProcessors to set
 */
public void setChannelProcessorOverrides(List<ChannelProcessor> channelProcessorOverrides) {
    this.channelProcessorOverrides = channelProcessorOverrides;
}