Is it possible to store tokens for example in Redis when use spring-authorization-server. In spring-security-oauth we can define TokenStore:
@Bean
public TokenStore redisTokenStore() {
RedisTokenStore redisTokenStore = new RedisTokenStore(redisConnectionFactory);
redisTokenStore.setPrefix(redisTokenPrefix);
return redisTokenStore;
}
In theory, i can implement interface OAuth2AuthorizationService but maybe there is an easier and more beautiful solution
Implementing
OAuth2AuthorizationService
is the correct way to do this. There is no built-in support for an integration with Redis. See #558 for more info.