use of org.springframework.security.web.authentication.rememberme.PersistentTokenBasedRememberMeServices in project spring-security by spring-projects.
the class PersistentTokenBasedRememberMeServicesTests method setUpData.
@Before
public void setUpData() throws Exception {
services = new PersistentTokenBasedRememberMeServices("key", new AbstractRememberMeServicesTests.MockUserDetailsService(AbstractRememberMeServicesTests.joe, false), new InMemoryTokenRepositoryImpl());
services.setCookieName("mycookiename");
// Default to 100 days (see SEC-1081).
services.setTokenValiditySeconds(100 * 24 * 60 * 60);
services.afterPropertiesSet();
}
use of org.springframework.security.web.authentication.rememberme.PersistentTokenBasedRememberMeServices in project spring-security by spring-projects.
the class PersistentTokenBasedRememberMeServicesTests method create.
private PersistentTokenBasedRememberMeServices create(PersistentRememberMeToken token) {
repo = new MockTokenRepository(token);
PersistentTokenBasedRememberMeServices services = new PersistentTokenBasedRememberMeServices("key", new AbstractRememberMeServicesTests.MockUserDetailsService(AbstractRememberMeServicesTests.joe, false), repo);
services.setCookieName("mycookiename");
return services;
}
Aggregations