Java Code Examples for org.springframework.security.web.authentication.rememberme.TokenBasedRememberMeServices

The following examples show how to use org.springframework.security.web.authentication.rememberme.TokenBasedRememberMeServices. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: todolist   Source File: WebSecurityConfiguration.java    License: MIT License 4 votes vote down vote up
@Bean
public RememberMeServices rememberMeServices() throws Exception {
    TokenBasedRememberMeServices result = new TokenBasedRememberMeServices("hell0w0r1d", service);
    result.setTokenValiditySeconds(2419200);
    return result;
}
 
Example 2
Source Project: thymeleafexamples-layouts   Source File: SecurityConfig.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
public TokenBasedRememberMeServices rememberMeServices() {
    return new TokenBasedRememberMeServices("remember-me-key", accountService);
}