use of org.springframework.messaging.support.AbstractMessageChannel in project spring-security by spring-projects.
the class AbstractSecurityWebSocketMessageBrokerConfigurerTests method securityContextChannelInterceptorDefinedByBean.
@Test
public void securityContextChannelInterceptorDefinedByBean() {
loadConfig(SockJsProxylessSecurityConfig.class);
MessageChannel messageChannel = clientInboundChannel();
SecurityContextChannelInterceptor securityContextChannelInterceptor = this.context.getBean(SecurityContextChannelInterceptor.class);
assertThat(((AbstractMessageChannel) messageChannel).getInterceptors()).contains(securityContextChannelInterceptor);
}
use of org.springframework.messaging.support.AbstractMessageChannel in project spring-security by spring-projects.
the class AbstractSecurityWebSocketMessageBrokerConfigurerTests method inboundChannelSecurityDefinedByBean.
@Test
public void inboundChannelSecurityDefinedByBean() {
loadConfig(SockJsProxylessSecurityConfig.class);
MessageChannel messageChannel = clientInboundChannel();
ChannelSecurityInterceptor inboundChannelSecurity = this.context.getBean(ChannelSecurityInterceptor.class);
assertThat(((AbstractMessageChannel) messageChannel).getInterceptors()).contains(inboundChannelSecurity);
}
use of org.springframework.messaging.support.AbstractMessageChannel in project spring-security by spring-projects.
the class AbstractSecurityWebSocketMessageBrokerConfigurerTests method csrfProtectionDefinedByBean.
@Test
public void csrfProtectionDefinedByBean() {
loadConfig(SockJsProxylessSecurityConfig.class);
MessageChannel messageChannel = clientInboundChannel();
CsrfChannelInterceptor csrfChannelInterceptor = this.context.getBean(CsrfChannelInterceptor.class);
assertThat(((AbstractMessageChannel) messageChannel).getInterceptors()).contains(csrfChannelInterceptor);
}
Aggregations