@Bean// browser remember me PersistentTokenBasedRememberMeServices persistentTokenBasedRememberMeServices(){ PersistentTokenBasedRememberMeServices p = new PersistentTokenBasedRememberMeServices("SpringRocks",myUserDetailService,new JdbcTokenRepositoryImpl()); p.setCookieName("JSESSIONID"); return p; }
@Bean public RememberMeServices rememberMeServices() { PersistentTokenBasedRememberMeServices services = new PersistentTokenBasedRememberMeServices( environment.getProperty("RM_KEY", "grassrootremembers"), userDetailsService, persistentTokenRepository()); services.setTokenValiditySeconds(1209600); // two weeks return services; }
@Bean public RememberMeServices rememberMeServices(String rememberBeKey) { return new PersistentTokenBasedRememberMeServices( rememberBeKey, basicRememberMeUserDetailsService(), new InMemoryTokenRepositoryImpl() ); }
@Bean public RememberMeServices getRememberMeServices() { PersistentTokenBasedRememberMeServices services = new PersistentTokenBasedRememberMeServices( rememberMeToken, new BasicRememberMeUserDetailsService(), new InMemoryTokenRepositoryImpl()); services.setParameter(rememberMeParameter); return services; }
@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; }
@Bean public PersistentTokenBasedRememberMeServices getPersistentTokenBasedRememberMeServices() { PersistentTokenBasedRememberMeServices tokenBasedservice = new PersistentTokenBasedRememberMeServices( "remember-me", userDetailsService, tokenRepository); return tokenBasedservice; }