use of org.springframework.security.messaging.handler.invocation.reactive.AuthenticationPrincipalArgumentResolver in project spring-boot by spring-projects.
the class RSocketSecurityAutoConfigurationTests method autoConfigurationAddsCustomizerForAuthenticationPrincipalArgumentResolver.
@Test
void autoConfigurationAddsCustomizerForAuthenticationPrincipalArgumentResolver() {
this.contextRunner.run((context) -> {
assertThat(context).hasSingleBean(RSocketMessageHandler.class);
RSocketMessageHandler handler = context.getBean(RSocketMessageHandler.class);
assertThat(handler.getArgumentResolverConfigurer().getCustomResolvers()).isNotEmpty().anyMatch((customResolver) -> customResolver instanceof AuthenticationPrincipalArgumentResolver);
});
}
Aggregations