Class AbstractClientLoader<T extends ClientEnvironment>
- java.lang.Object
-
- edu.uiuc.ncsa.security.core.util.LoggingConfigLoader<T>
-
- org.oa4mp.delegation.common.servlet.DBConfigLoader<T>
-
- org.oa4mp.client.api.loader.AbstractClientLoader<T>
-
- All Implemented Interfaces:
ClientLoaderInterface
,edu.uiuc.ncsa.security.core.util.ConfigurationLoader<T>
,edu.uiuc.ncsa.security.core.Version
,Serializable
- Direct Known Subclasses:
OA2ClientLoader
public abstract class AbstractClientLoader<T extends ClientEnvironment> extends DBConfigLoader<T> implements ClientLoaderInterface
Top-level class for client loader that creates asset store and controls which classes are instantiated for the client.Created by Jeff Gaynor
on 11/25/13 at 1:12 PM- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
ACCESS_TOKEN_ENDPOINT
static String
ASSET_ENDPOINT
protected javax.inject.Provider<AssetStore>
assetStoreProvider
static String
AUTHORIZE_ENDPOINT
static long
defaultCertLifetime
static String
DEVICE_AUTHORIZATION_ENDPOINT
protected javax.inject.Provider<DelegationService>
dsp
static String
INITIATE_ENDPOINT
static String
INTROSPECTION_ENDPOINT
static String
REVOCATION_ENDPOINT
static String
USER_INFO_ENDPOINT
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractClientLoader(org.apache.commons.configuration.tree.ConfigurationNode node)
protected
AbstractClientLoader(org.apache.commons.configuration.tree.ConfigurationNode node, edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected long
checkCertLifetime()
protected void
checkProtocol(String b)
Fix for OAUTH-107.protected URI
checkURI(String x, String componentName)
edu.uiuc.ncsa.security.servlet.ServiceClient
createServiceClient(URI host)
protected URI
createServiceURI(String foundURI, String baseUri, String serviceEndpoint)
Checks if there is a found uri in the configuration.protected URI
getAccessTokenURI()
abstract AssetProvider
getAssetProvider()
protected javax.inject.Provider<AssetStore>
getAssetStoreProvider()
protected URI
getAssetURI()
protected URI
getAuthorizeURI()
protected String
getBaseURI()
protected URI
getCallback()
protected String
getCfgValue(String key)
This takes a key and returns the value of the node associated with that key.protected abstract javax.inject.Provider<DelegationService>
getDSP()
protected String
getId()
protected URI
getInitiateURI()
protected long
getKeypairLifetime()
protected long
getMaxAssetLifetime()
protected String
getSkin()
edu.uiuc.ncsa.security.util.ssl.SSLConfiguration
getSSLConfiguration()
protected boolean
isEnableAssetCleanup()
T
load()
-
Methods inherited from class edu.uiuc.ncsa.oa4mp.delegation.common.servlet.DBConfigLoader
getDerbyConnectionPoolProvider, getDerbyConnectionPoolProvider, getMariaDBConnectionPoolProvider, getMariaDBConnectionPoolProvider, getMySQLConnectionPoolProvider, getMySQLConnectionPoolProvider, getPgConnectionPoolProvider, getPgConnectionPoolProvider, isDefaultStoreDisabled
-
Methods inherited from class edu.uiuc.ncsa.security.core.util.LoggingConfigLoader
debug, getDebugger, getVersionString, info, warn
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface edu.uiuc.ncsa.myproxy.oa4mp.client.ClientLoaderInterface
getServiceProvider
-
-
-
-
Field Detail
-
ACCESS_TOKEN_ENDPOINT
public static final String ACCESS_TOKEN_ENDPOINT
- See Also:
- Constant Field Values
-
AUTHORIZE_ENDPOINT
public static final String AUTHORIZE_ENDPOINT
- See Also:
- Constant Field Values
-
ASSET_ENDPOINT
public static final String ASSET_ENDPOINT
- See Also:
- Constant Field Values
-
INITIATE_ENDPOINT
public static final String INITIATE_ENDPOINT
- See Also:
- Constant Field Values
-
USER_INFO_ENDPOINT
public static final String USER_INFO_ENDPOINT
- See Also:
- Constant Field Values
-
INTROSPECTION_ENDPOINT
public static final String INTROSPECTION_ENDPOINT
- See Also:
- Constant Field Values
-
REVOCATION_ENDPOINT
public static final String REVOCATION_ENDPOINT
- See Also:
- Constant Field Values
-
DEVICE_AUTHORIZATION_ENDPOINT
public static final String DEVICE_AUTHORIZATION_ENDPOINT
- See Also:
- Constant Field Values
-
defaultCertLifetime
public static final long defaultCertLifetime
- See Also:
- Constant Field Values
-
assetStoreProvider
protected javax.inject.Provider<AssetStore> assetStoreProvider
-
dsp
protected javax.inject.Provider<DelegationService> dsp
-
-
Constructor Detail
-
AbstractClientLoader
protected AbstractClientLoader(org.apache.commons.configuration.tree.ConfigurationNode node)
-
AbstractClientLoader
protected AbstractClientLoader(org.apache.commons.configuration.tree.ConfigurationNode node, edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger)
-
-
Method Detail
-
getAssetProvider
public abstract AssetProvider getAssetProvider()
-
getAssetStoreProvider
protected javax.inject.Provider<AssetStore> getAssetStoreProvider()
-
getDSP
protected abstract javax.inject.Provider<DelegationService> getDSP()
-
getCfgValue
protected String getCfgValue(String key)
This takes a key and returns the value of the node associated with that key.- Parameters:
key
-- Returns:
-
getSkin
protected String getSkin()
-
getKeypairLifetime
protected long getKeypairLifetime()
-
getMaxAssetLifetime
protected long getMaxAssetLifetime()
-
isEnableAssetCleanup
protected boolean isEnableAssetCleanup()
-
createServiceURI
protected URI createServiceURI(String foundURI, String baseUri, String serviceEndpoint)
Checks if there is a found uri in the configuration. If so, check that and use it, if not, try and construct the service endpoint from the base uri.- Parameters:
foundURI
-baseUri
-serviceEndpoint
-- Returns:
-
checkCertLifetime
protected long checkCertLifetime()
-
getId
protected String getId()
-
getCallback
protected URI getCallback()
-
checkProtocol
protected void checkProtocol(String b)
Fix for OAUTH-107. Check that the protocols are indeed https as per spec at client loading rather than wait for a much later error from a server possibly trying to do a redirect. It is ok for the argument to be null, since that just means that a (correct) address will be created. This is to find mis-specified service addresses.- Parameters:
b
-
-
getBaseURI
protected String getBaseURI()
-
getAccessTokenURI
protected URI getAccessTokenURI()
-
getAssetURI
protected URI getAssetURI()
-
getAuthorizeURI
protected URI getAuthorizeURI()
-
getInitiateURI
protected URI getInitiateURI()
-
load
public T load()
- Specified by:
load
in interfaceedu.uiuc.ncsa.security.core.util.ConfigurationLoader<T extends ClientEnvironment>
-
getSSLConfiguration
public edu.uiuc.ncsa.security.util.ssl.SSLConfiguration getSSLConfiguration()
-
createServiceClient
public edu.uiuc.ncsa.security.servlet.ServiceClient createServiceClient(URI host)
-
-