List of usage examples for org.springframework.security.messaging.access.intercept ChannelSecurityInterceptor setAccessDecisionManager
public void setAccessDecisionManager(AccessDecisionManager accessDecisionManager)
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); }// w w w . jav a 2 s . co m List<AccessDecisionVoter> voters = new ArrayList<AccessDecisionVoter>(); voters.add(voter); AffirmativeBased manager = new AffirmativeBased(voters); channelSecurityInterceptor.setAccessDecisionManager(manager); return channelSecurityInterceptor; }