Search in sources :

Example 1 with PostProcessedMockUserDetailsService

use of org.springframework.security.config.PostProcessedMockUserDetailsService in project spring-security by spring-projects.

the class GlobalMethodSecurityBeanDefinitionParserTests method doesntInterfereWithBeanPostProcessing.

@Test
public void doesntInterfereWithBeanPostProcessing() {
    setContext("<b:bean id='myUserService' class='org.springframework.security.config.PostProcessedMockUserDetailsService'/>" + "<global-method-security />" + "<authentication-manager>" + "   <authentication-provider user-service-ref='myUserService'/>" + "</authentication-manager>" + "<b:bean id='beanPostProcessor' class='org.springframework.security.config.MockUserServiceBeanPostProcessor'/>");
    PostProcessedMockUserDetailsService service = (PostProcessedMockUserDetailsService) appContext.getBean("myUserService");
    assertThat(service.getPostProcessorWasHere()).isEqualTo("Hello from the post processor!");
}
Also used : PostProcessedMockUserDetailsService(org.springframework.security.config.PostProcessedMockUserDetailsService) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 PostProcessedMockUserDetailsService (org.springframework.security.config.PostProcessedMockUserDetailsService)1