Class OA2SQLTStore<V extends OA2ServiceTransaction>
- java.lang.Object
-
- edu.uiuc.ncsa.security.storage.sql.SQLDatabase
-
- edu.uiuc.ncsa.security.storage.sql.SQLStore<V>
-
- org.oa4mp.delegation.common.transactions.storage.SQLBaseTransactionStore<V>
-
- org.oa4mp.delegation.server.storage.SQLServiceTransactionStore<V>
-
- org.oa4mp.server.api.transactions.admin.DSSQLTransactionStore<V>
-
- org.oa4mp.server.loader.oauth2.storage.transactions.OA2SQLTStore<V>
-
- All Implemented Interfaces:
RefreshTokenStore<V>
,RFC8628Store<V>
,OA2TStoreInterface<V>
,UsernameFindable<V>
,TransactionStore<V>
,edu.uiuc.ncsa.security.core.Store<V>
,Map<edu.uiuc.ncsa.security.core.Identifier,V>
public class OA2SQLTStore<V extends OA2ServiceTransaction> extends DSSQLTransactionStore<V> implements OA2TStoreInterface<V>
Created by Jeff Gaynor
on 3/25/14 at 10:30 AM
-
-
Field Summary
-
Fields inherited from class edu.uiuc.ncsa.oa4mp.delegation.server.storage.SQLServiceTransactionStore
DEFAULT_TABLENAME
-
Fields inherited from class edu.uiuc.ncsa.oa4mp.delegation.common.storage.transactions.SQLBaseTransactionStore
tokenForge
-
-
Constructor Summary
Constructors Constructor Description OA2SQLTStore(TokenForge tokenForge, edu.uiuc.ncsa.security.storage.sql.ConnectionPool connectionPool, edu.uiuc.ncsa.security.storage.sql.internals.Table table, javax.inject.Provider<V> idp, edu.uiuc.ncsa.security.storage.data.MapConverter converter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description V
get(AccessTokenImpl accessToken, edu.uiuc.ncsa.security.core.Identifier clientID)
V
get(RefreshTokenImpl refreshToken, edu.uiuc.ncsa.security.core.Identifier clientID)
V
get(RefreshToken refreshToken)
protected V
get(String token, String clientID, boolean isAccessToken)
V
getByProxyID(edu.uiuc.ncsa.security.core.Identifier proxyID)
V
getByRefreshToken(RefreshToken refreshToken)
V
getByUserCode(String userCode)
List<V>
getByUsername(String username)
String
getCreationTSField()
List<RFC8628State>
getPending()
Since this is potentially a very intensive operation run only once at startup this has been tweaked to exactly let the database grab the minimum and process it here.V
getSingleValue(String targetString, String preparedStatement)
TokenInfoRecordMap
getTokenInfo(String username)
boolean
hasUserCode(String userCode)
TODO - Improve this with a specific query later.-
Methods inherited from class edu.uiuc.ncsa.oa4mp.delegation.server.storage.SQLServiceTransactionStore
getCreatedTransactions, register, toString
-
Methods inherited from class edu.uiuc.ncsa.oa4mp.delegation.common.storage.transactions.SQLBaseTransactionStore
get, get, get, getTransaction, getTransactionTable
-
Methods inherited from class edu.uiuc.ncsa.security.storage.sql.SQLStore
checkColumns, checkTable, clear, containsKey, containsValue, create, depopulate, entrySet, get, getAll, getDerbyMostRecent, getMapConverter, getMostRecent, getMostRecentStatement, getTable, getXMLConverter, isEmpty, keySet, populate, put, putAll, remove, remove, save, search, search, search, size, size, size, update, values
-
Methods inherited from class edu.uiuc.ncsa.security.storage.sql.SQLDatabase
destroyConnection, getConnection, getConnectionPool, releaseConnection, rsToMap, setConnectionPool
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from interface edu.uiuc.ncsa.security.core.Store
create, getAll, getMostRecent, getXMLConverter, register, remove, save, search, search, search, size, update
-
Methods inherited from interface edu.uiuc.ncsa.oa4mp.delegation.common.storage.TransactionStore
get, get, get, getMapConverter
-
-
-
-
Constructor Detail
-
OA2SQLTStore
public OA2SQLTStore(TokenForge tokenForge, edu.uiuc.ncsa.security.storage.sql.ConnectionPool connectionPool, edu.uiuc.ncsa.security.storage.sql.internals.Table table, javax.inject.Provider<V> idp, edu.uiuc.ncsa.security.storage.data.MapConverter converter)
-
-
Method Detail
-
getCreationTSField
public String getCreationTSField()
- Overrides:
getCreationTSField
in classDSSQLTransactionStore<V extends OA2ServiceTransaction>
-
get
public V get(RefreshToken refreshToken)
- Specified by:
get
in interfaceOA2TStoreInterface<V extends OA2ServiceTransaction>
- Specified by:
get
in interfaceRefreshTokenStore<V extends OA2ServiceTransaction>
-
getByRefreshToken
public V getByRefreshToken(RefreshToken refreshToken)
-
get
public V get(AccessTokenImpl accessToken, edu.uiuc.ncsa.security.core.Identifier clientID)
- Specified by:
get
in interfaceOA2TStoreInterface<V extends OA2ServiceTransaction>
-
get
public V get(RefreshTokenImpl refreshToken, edu.uiuc.ncsa.security.core.Identifier clientID)
- Specified by:
get
in interfaceRefreshTokenStore<V extends OA2ServiceTransaction>
-
getByUsername
public List<V> getByUsername(String username)
- Specified by:
getByUsername
in interfaceOA2TStoreInterface<V extends OA2ServiceTransaction>
- Specified by:
getByUsername
in interfaceUsernameFindable<V extends OA2ServiceTransaction>
-
getTokenInfo
public TokenInfoRecordMap getTokenInfo(String username)
- Specified by:
getTokenInfo
in interfaceOA2TStoreInterface<V extends OA2ServiceTransaction>
-
getPending
public List<RFC8628State> getPending()
Since this is potentially a very intensive operation run only once at startup this has been tweaked to exactly let the database grab the minimum and process it here.- Specified by:
getPending
in interfaceOA2TStoreInterface<V extends OA2ServiceTransaction>
- Specified by:
getPending
in interfaceRFC8628Store<V extends OA2ServiceTransaction>
- Returns:
-
getByProxyID
public V getByProxyID(edu.uiuc.ncsa.security.core.Identifier proxyID)
- Specified by:
getByProxyID
in interfaceOA2TStoreInterface<V extends OA2ServiceTransaction>
- Specified by:
getByProxyID
in interfaceTransactionStore<V extends OA2ServiceTransaction>
- Overrides:
getByProxyID
in classDSSQLTransactionStore<V extends OA2ServiceTransaction>
-
getByUserCode
public V getByUserCode(String userCode)
- Specified by:
getByUserCode
in interfaceOA2TStoreInterface<V extends OA2ServiceTransaction>
- Specified by:
getByUserCode
in interfaceRFC8628Store<V extends OA2ServiceTransaction>
-
hasUserCode
public boolean hasUserCode(String userCode)
TODO - Improve this with a specific query later.- Specified by:
hasUserCode
in interfaceOA2TStoreInterface<V extends OA2ServiceTransaction>
- Specified by:
hasUserCode
in interfaceRFC8628Store<V extends OA2ServiceTransaction>
- Parameters:
userCode
-- Returns:
-
-