use of org.springframework.security.messaging.web.csrf.CsrfChannelInterceptor 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