Java 类org.springframework.security.web.authentication.rememberme.PersistentTokenBasedRememberMeServices 实例源码

项目:spring-cloud-demos    文件:SecurityConfig.java   
@Bean// browser remember me
PersistentTokenBasedRememberMeServices persistentTokenBasedRememberMeServices(){
    PersistentTokenBasedRememberMeServices p =
            new PersistentTokenBasedRememberMeServices("SpringRocks",myUserDetailService,new JdbcTokenRepositoryImpl());
    p.setCookieName("JSESSIONID");
    return p;
}
项目:grassroot-platform    文件:SecurityConfig.java   
@Bean
public RememberMeServices rememberMeServices() {
    PersistentTokenBasedRememberMeServices services = new PersistentTokenBasedRememberMeServices(
            environment.getProperty("RM_KEY", "grassrootremembers"),
            userDetailsService, persistentTokenRepository());
    services.setTokenValiditySeconds(1209600); // two weeks
    return services;
}
项目:ontrack    文件:WebSecurityConfig.java   
@Bean
public RememberMeServices rememberMeServices(String rememberBeKey) {
    return new PersistentTokenBasedRememberMeServices(
            rememberBeKey,
            basicRememberMeUserDetailsService(),
            new InMemoryTokenRepositoryImpl()
    );
}
项目:enhanced-pet-clinic    文件:MultiHttpSecurityConfig.java   
@Bean
public RememberMeServices getRememberMeServices() {
    PersistentTokenBasedRememberMeServices services = new PersistentTokenBasedRememberMeServices(
            rememberMeToken, new BasicRememberMeUserDetailsService(), new InMemoryTokenRepositoryImpl());
    services.setParameter(rememberMeParameter);
    return services;
}
项目:enhanced-pet-clinic    文件:MultiHttpSecurityConfig.java   
@Bean
public RememberMeServices getRememberMeServices() {
    JdbcUserDetailsManager jdbcUserDetailsManager = new JdbcUserDetailsManager();
    jdbcUserDetailsManager.setDataSource(dataSource);

    JdbcTokenRepositoryImpl jdbcTokenRepositoryImpl = new JdbcTokenRepositoryImpl();
    jdbcTokenRepositoryImpl.setDataSource(dataSource);

    PersistentTokenBasedRememberMeServices services = new PersistentTokenBasedRememberMeServices(
            rememberMeToken, jdbcUserDetailsManager, jdbcTokenRepositoryImpl);
    services.setParameter(rememberMeParameter);
    return services;
}
项目:FeedbackCollectionAndMgmtSystem    文件:SecurityConfiguration.java   
@Bean
public PersistentTokenBasedRememberMeServices getPersistentTokenBasedRememberMeServices() {
    PersistentTokenBasedRememberMeServices tokenBasedservice = new PersistentTokenBasedRememberMeServices(
            "remember-me", userDetailsService, tokenRepository);
    return tokenBasedservice;
}
项目:Webstore    文件:SecurityConfiguration.java   
@Bean
public PersistentTokenBasedRememberMeServices getPersistentTokenBasedRememberMeServices() {
    PersistentTokenBasedRememberMeServices tokenBasedservice = new PersistentTokenBasedRememberMeServices(
            "remember-me", userDetailsService, tokenRepository);
    return tokenBasedservice;
}