Class KESQLStore<V extends KERecord>
- java.lang.Object
-
- edu.uiuc.ncsa.security.storage.sql.SQLDatabase
-
- edu.uiuc.ncsa.security.storage.sql.SQLStore<V>
-
- org.oa4mp.server.loader.oauth2.storage.keys.KESQLStore<V>
-
-
Constructor Summary
Constructors Constructor Description KESQLStore()KESQLStore(edu.uiuc.ncsa.security.storage.sql.ConnectionPool connectionPool, edu.uiuc.ncsa.security.storage.sql.internals.Table table, javax.inject.Provider<V> identifiableProvider, edu.uiuc.ncsa.security.storage.data.MapConverter<V> converter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KERecordgetByKID(String kid)For a given key id (kid) find an return.edu.uiuc.ncsa.security.core.util.IdentifiableMap<KERecord>getByVI(VirtualIssuer vi)Return valid Key Records for a given virtual issuer.edu.uiuc.ncsa.security.core.util.IdentifiableMap<KERecord>getByVI(VirtualIssuer vi, boolean validKeysOnly)protected MapgetByVID(boolean keysOnly)Identical to#getByVID(VirtualIssuer, boolean)but for all virtual issuers..protected MapgetByVID(VirtualIssuer vi, boolean validKeysOnly, boolean keysOnly)Return the current keys for the given virtual issuer.StringgetCreationTSField()edu.uiuc.ncsa.security.util.jwk.JSONWebKeysgetCurrentKeys()Get all currently active keys.edu.uiuc.ncsa.security.util.jwk.JSONWebKeysgetCurrentKeys(VirtualIssuer vi)Gets the currently active keys for a given virtual issuer.HashSet<String>getKIDs()Get all of the key ids used in this store.KEConverter<V>getXMLConverter()protected booleanisValidDate(Date date)Used for setting the date in JWKs.-
Methods inherited from class edu.uiuc.ncsa.security.storage.sql.SQLStore
checkColumns, checkTable, clear, containsKey, containsValue, crappySQLParser, crappySQLParser, create, depopulate, doRegisterStatement, entrySet, get, getAll, getDerbyMostRecent, getMapConverter, getMostRecent, getMostRecentStatement, getTable, isEmpty, keySet, populate, put, putAll, register, register, remove, remove, removeByID, save, save, search, search, search, search, setUpdateValues, size, size, size, toString, update, update, update, update, updateRS, 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, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Constructor Detail
-
KESQLStore
public KESQLStore(edu.uiuc.ncsa.security.storage.sql.ConnectionPool connectionPool, edu.uiuc.ncsa.security.storage.sql.internals.Table table, javax.inject.Provider<V> identifiableProvider, edu.uiuc.ncsa.security.storage.data.MapConverter<V> converter)
-
KESQLStore
public KESQLStore()
-
-
Method Detail
-
getXMLConverter
public KEConverter<V> getXMLConverter()
-
getCreationTSField
public String getCreationTSField()
-
getByKID
public KERecord getByKID(String kid)
Description copied from interface:KEStoreFor a given key id (kid) find an return. Key ids are unique in the database. This may be null if there is no suchKERecord.
-
isValidDate
protected boolean isValidDate(Date date)
Used for setting the date in JWKs. If the date exists and is valid, then return true Valid means that the long value is positive.- Parameters:
date-- Returns:
-
getKIDs
public HashSet<String> getKIDs()
Description copied from interface:KEStoreGet all of the key ids used in this store.
-
getCurrentKeys
public edu.uiuc.ncsa.security.util.jwk.JSONWebKeys getCurrentKeys(VirtualIssuer vi)
Description copied from interface:KEStoreGets the currently active keys for a given virtual issuer. Note that the virtual issuer for the server is OA2SE#SERVER_VI_ID. A current key is defined as having not expired and being valid.- Specified by:
getCurrentKeysin interfaceKEStore<V extends KERecord>- Returns:
-
getCurrentKeys
public edu.uiuc.ncsa.security.util.jwk.JSONWebKeys getCurrentKeys()
Description copied from interface:KEStoreGet all currently active keys.- Specified by:
getCurrentKeysin interfaceKEStore<V extends KERecord>- Returns:
-
getByVID
protected Map getByVID(boolean keysOnly)
Identical to#getByVID(VirtualIssuer, boolean)but for all virtual issuers..- Parameters:
keysOnly-- Returns:
-
getByVID
protected Map getByVID(VirtualIssuer vi, boolean validKeysOnly, boolean keysOnly)
Return the current keys for the given virtual issuer. If keysOnly is true, then return a JSONWebKeys object. Otherwise, return a map of KERecords.- Parameters:
vi-keysOnly-- Returns:
-
getByVI
public edu.uiuc.ncsa.security.core.util.IdentifiableMap<KERecord> getByVI(VirtualIssuer vi)
Description copied from interface:KEStoreReturn valid Key Records for a given virtual issuer. This means that they have no expired and are valid. The identifier is the ID of the KERecord.
-
-