SpringSource/spring-security-oauth — pull request #11 by nklasens (2012-01-05 10:52:59+00:00)
Title: SECOAUTH-179 improvement suggestions

Issue SECOAUTH-179 Improve extendability of RandomValueTokenServices by keeping storage separate from token creation

My few commits were related to the same improvements. They go a few steps further.

1 random tokenvalue and expiration date are calculated in RandomValueTokenServices and passed to a new createXXXToken method. Subclasses can override this new createXXXToken method to instantiate their own token class. This way RandomValueTokenServices is responsible for tokenvalue and expiration.

2 Optimized the TokenStore interface a little to have a more efficient store implementation. My CustomTokenStore does not use the tokenvalue as primary lookup key. With these changes I can pass around my custom primary key.