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

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

Introduction

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

Prototype

public RememberMeServices getRememberMeServices() 

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 a  2  s.com*/

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