Search in sources :

Example 6 with RememberMeAuthenticationProvider

use of org.springframework.security.authentication.RememberMeAuthenticationProvider in project spring-security by spring-projects.

the class RememberMeAuthenticationProviderTests method testSupports.

@Test
public void testSupports() {
    RememberMeAuthenticationProvider aap = new RememberMeAuthenticationProvider("qwerty");
    assertThat(aap.supports(RememberMeAuthenticationToken.class)).isTrue();
    assertThat(aap.supports(TestingAuthenticationToken.class)).isFalse();
}
Also used : RememberMeAuthenticationProvider(org.springframework.security.authentication.RememberMeAuthenticationProvider) Test(org.junit.Test)

Aggregations

RememberMeAuthenticationProvider (org.springframework.security.authentication.RememberMeAuthenticationProvider)6 Test (org.junit.Test)5 RememberMeAuthenticationToken (org.springframework.security.authentication.RememberMeAuthenticationToken)2 BadCredentialsException (org.springframework.security.authentication.BadCredentialsException)1 TestingAuthenticationToken (org.springframework.security.authentication.TestingAuthenticationToken)1 Authentication (org.springframework.security.core.Authentication)1 RememberMeServices (org.springframework.security.web.authentication.RememberMeServices)1 AbstractRememberMeServices (org.springframework.security.web.authentication.rememberme.AbstractRememberMeServices)1 PersistentTokenBasedRememberMeServices (org.springframework.security.web.authentication.rememberme.PersistentTokenBasedRememberMeServices)1 TokenBasedRememberMeServices (org.springframework.security.web.authentication.rememberme.TokenBasedRememberMeServices)1