use of org.springframework.security.rsocket.core.SecuritySocketAcceptorInterceptor in project spring-boot by spring-projects.
the class RSocketSecurityAutoConfigurationTests method autoConfigurationAddsCustomizerForServerRSocketFactory.
@Test
void autoConfigurationAddsCustomizerForServerRSocketFactory() {
RSocketServer server = RSocketServer.create();
this.contextRunner.run((context) -> {
RSocketServerCustomizer customizer = context.getBean(RSocketServerCustomizer.class);
customizer.customize(server);
server.interceptors((registry) -> registry.forSocketAcceptor((interceptors) -> {
assertThat(interceptors).isNotEmpty();
assertThat(interceptors).anyMatch((interceptor) -> interceptor instanceof SecuritySocketAcceptorInterceptor);
}));
});
}
Aggregations