How to store a token in a DB other than jdbcTokenStore?
I now have this configuration of the oAUth2 token store
<bean id="tokenStore"
class="org.springframework.security.oauth2.provider.token.InMemoryTokenStore" />
<bean id="tokenServices"
class="org.springframework.security.oauth2.provider.token.DefaultTokenServices">
<property name="tokenStore" ref="tokenStore" />
<property name="supportRefreshToken" value="true" />
<property name="accessTokenValiditySeconds" value="120" />
<property name="clientDetailsService" ref="clientDetails" />
</bean>
I want to store the token in the database, so I need another custom implementation to store and retrieve the token. I have checked jdbcTokenStore
but it needs DataStore
and I am using cassandra so it is not possible to pass a DataStore instance. So, is there any other solution besides jdbcTokenStore
storing the toke in the db?
+3
source to share