nl.surfnet.coin.api.oauth
Class OpenConextOauth2JdbcTokenStore

java.lang.Object
  extended by org.springframework.security.oauth2.provider.token.JdbcTokenStore
      extended by nl.surfnet.coin.api.oauth.OpenConextOauth2JdbcTokenStore
All Implemented Interfaces:
org.springframework.security.oauth2.provider.token.TokenStore

public class OpenConextOauth2JdbcTokenStore
extends org.springframework.security.oauth2.provider.token.JdbcTokenStore

JdbcTokenStore that add the ClientMetaData from Janus if it is not present. The reason for this subclass is that the original JdbcTokenStore#getAccessToken does also do a remove and a new insert if the authentication has changed. We don't have the hook to enhance the Authentication in this case (as we do with the normal DefaultTokenServices#createAccessToken where we have a ClientMetaDataTokenEnhancer that does the lookup of the details in Janus.


Constructor Summary
OpenConextOauth2JdbcTokenStore(DataSource dataSource)
           
 
Method Summary
 void storeAccessToken(org.springframework.security.oauth2.common.OAuth2AccessToken token, org.springframework.security.oauth2.provider.OAuth2Authentication authentication)
           
 
Methods inherited from class org.springframework.security.oauth2.provider.token.JdbcTokenStore
findTokensByClientId, findTokensByUserName, getAccessToken, readAccessToken, readAuthentication, readAuthentication, readAuthenticationForRefreshToken, readAuthenticationForRefreshToken, readRefreshToken, removeAccessToken, removeAccessToken, removeAccessTokenUsingRefreshToken, removeAccessTokenUsingRefreshToken, removeRefreshToken, removeRefreshToken, setAuthenticationKeyGenerator, setDeleteAccessTokenFromRefreshTokenSql, setDeleteAccessTokenSql, setDeleteRefreshTokenSql, setInsertAccessTokenSql, setInsertRefreshTokenSql, setSelectAccessTokenAuthenticationSql, setSelectAccessTokenFromAuthenticationSql, setSelectAccessTokenSql, setSelectRefreshTokenAuthenticationSql, setSelectRefreshTokenSql, storeRefreshToken
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenConextOauth2JdbcTokenStore

public OpenConextOauth2JdbcTokenStore(DataSource dataSource)
Parameters:
dataSource -
Method Detail

storeAccessToken

public void storeAccessToken(org.springframework.security.oauth2.common.OAuth2AccessToken token,
                             org.springframework.security.oauth2.provider.OAuth2Authentication authentication)
Specified by:
storeAccessToken in interface org.springframework.security.oauth2.provider.token.TokenStore
Overrides:
storeAccessToken in class org.springframework.security.oauth2.provider.token.JdbcTokenStore


Copyright © 2009-2012 SURFnet bv, The Netherlands. All Rights Reserved.