Skip to content

Instantly share code, notes, and snippets.

View tgkprog's full-sized avatar
🎉
Focusing

Tushar Kapila tgkprog

🎉
Focusing
View GitHub Profile
@efenderbosch
efenderbosch / RedisTokenStore
Created January 19, 2015 20:27
Redis Token Store for Spring Security
public class RedisTokenStore implements TokenStore {
private static final StringRedisSerializer STRING_SERIALIZER = new StringRedisSerializer();
private static final ObjectMapper OBJECT_MAPPER = new JodaMapper().disable(WRITE_DATES_AS_TIMESTAMPS);
private final BoundHashOperations<String, String, OAuth2AccessToken> accessTokenStore;
private final BoundHashOperations<String, String, OAuth2AccessToken> authenticationToAccessTokenStore;
private final ListOperations<String, OAuth2AccessToken> userNameToAccessTokenStore;
private final ListOperations<String, OAuth2AccessToken> clientIdToAccessTokenStore;
private final BoundHashOperations<String, String, OAuth2RefreshToken> refreshTokenStore;