These are chat archives for spring-guides/tut-spring-security-and-angular-js

18th
Mar 2015
Firoz Fazil
@ffazil
Mar 18 2015 18:10
Hi @dsyer
How do I implement and set a persistent token store?
Dave Syer
@dsyer
Mar 18 2015 18:18
You create an instance of TokenStore and inject it into the server callbacks (different callback for auth and resource server).
*ServerConfigurer
Firoz Fazil
@ffazil
Mar 18 2015 18:19
@Bean
public DefaultTokenServices tokenServices() throws Exception {
DefaultTokenServices tokenServices = new DefaultTokenServices();
tokenServices.setAccessTokenValiditySeconds(6000);
tokenServices.setClientDetailsService(clientDetailsService);
tokenServices.setTokenEnhancer(tenantTokenEnhancer);
tokenServices.setSupportRefreshToken(true);
tokenServices.setTokenStore(jpaTokenStore);
return tokenServices;
}
Dave Syer
@dsyer
Mar 18 2015 18:34
that might work
JPA makes me nervous