Example usage for org.springframework.security.web.authentication AbstractAuthenticationProcessingFilter getAuthenticationManager

List of usage examples for org.springframework.security.web.authentication AbstractAuthenticationProcessingFilter getAuthenticationManager

Introduction

In this page you can find the example usage for org.springframework.security.web.authentication AbstractAuthenticationProcessingFilter getAuthenticationManager.

Prototype

protected AuthenticationManager getAuthenticationManager() 

Source Link

Usage

From source file:org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilterTests.java

@Test
public void testGettersSetters() throws Exception {
    AbstractAuthenticationProcessingFilter filter = new MockAuthenticationFilter();
    filter.setAuthenticationManager(mock(AuthenticationManager.class));
    filter.setFilterProcessesUrl("/p");
    filter.afterPropertiesSet();//from w w  w .  j av a2 s  . c  o m

    assertThat(filter.getRememberMeServices()).isNotNull();
    filter.setRememberMeServices(new TokenBasedRememberMeServices("key",
            new AbstractRememberMeServicesTests.MockUserDetailsService()));
    assertThat(filter.getRememberMeServices().getClass()).isEqualTo(TokenBasedRememberMeServices.class);
    assertThat(filter.getAuthenticationManager() != null).isTrue();
}