List of usage examples for org.springframework.security.messaging.access.intercept ChannelSecurityInterceptor ChannelSecurityInterceptor
public ChannelSecurityInterceptor(MessageSecurityMetadataSource metadataSource)
From source file:ch.rasc.wampspring.security.AbstractSecurityWampConfigurer.java
@Bean public ChannelSecurityInterceptor inboundChannelSecurity() { ChannelSecurityInterceptor channelSecurityInterceptor = new ChannelSecurityInterceptor( inboundMessageSecurityMetadataSource()); List<AccessDecisionVoter<? extends Object>> voters = new ArrayList<>(); voters.add(new MessageExpressionVoter<>()); AffirmativeBased manager = new AffirmativeBased(voters); channelSecurityInterceptor.setAccessDecisionManager(manager); return channelSecurityInterceptor; }
From source file:com.northstrat.springsecurity.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer.java
@Bean public ChannelSecurityInterceptor inboundChannelSecurity() { ChannelSecurityInterceptor channelSecurityInterceptor = new ChannelSecurityInterceptor( inboundMessageSecurityMetadataSource()); MessageExpressionVoter<Object> voter = new MessageExpressionVoter<Object>(); if (expressionHandler != null) { voter.setExpressionHandler(expressionHandler); }/*from w w w. j a va 2s . com*/ List<AccessDecisionVoter> voters = new ArrayList<AccessDecisionVoter>(); voters.add(voter); AffirmativeBased manager = new AffirmativeBased(voters); channelSecurityInterceptor.setAccessDecisionManager(manager); return channelSecurityInterceptor; }