Package org.oa4mp.client.loader
Class OA2ClientLoaderImpl<T extends OA2ClientEnvironment>
- java.lang.Object
-
- org.oa4mp.client.loader.OA2ClientLoaderImpl<T>
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.util.ConfigurationLoader<T>,Serializable,ClientLoaderInterface<T>
public abstract class OA2ClientLoaderImpl<T extends OA2ClientEnvironment> extends Object implements ClientLoaderInterface<T>
Refactoring of the client that has a lot of OAuth 1.0a cruft that just needs to go away, as well as a lot of code that should be centralized.Created by Jeff Gaynor
on 12/18/23 at 4:03 PM- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected OA2AssetConverterassetConverterprotected OA2AssetSerializationKeysassetKeysprotected AssetProviderassetProviderprotected javax.inject.Provider<org.oa4mp.delegation.common.token.TokenForge>tokenForgeProvider
-
Constructor Summary
Constructors Constructor Description OA2ClientLoaderImpl()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected URIcheckURI(String uri, String componentName)Checks the uri.edu.uiuc.ncsa.security.servlet.ServiceClientcreateServiceClient(URI host)protected URIcreateServiceURI(String foundURI, String endpoint, String wellKnownEntry)AssetProvidergetAssetProvider()abstract edu.uiuc.ncsa.security.core.util.MetaDebugUtilgetDebugger()Checks for and sets up the debugging for this loader.protected edu.uiuc.ncsa.security.core.util.MetaDebugUtilgetDebugger(String debugLevel)protected javax.inject.Provider<org.oa4mp.delegation.client.DelegationService>getDSP()abstract edu.uiuc.ncsa.security.core.util.LoggerProvidergetLoggerProvider()OA2MPServiceProvidergetServiceProvider()edu.uiuc.ncsa.security.servlet.ServiceClientgetWellKnownClient()net.sf.json.JSONObjectgetWellKnownConfiguration()The well-known page from the server.StringgetWellKnownString(String key)Get the given value from the given key on the well-known page.ObjectgetWellKnownValue(String key)Get a value form the well-known configuration which may be a JSON or other object.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.oa4mp.client.api.ClientLoaderInterface
getAccessTokenURI, getAdditionalParameters, getAssetStoreProvider, getAssetURI, getAuthorizeURI, getCallback, getCertLifetime, getDeviceAuthorizationURI, getId, getIssuer, getKeypairLifetime, getKeys, getKID, getMaxAssetLifetime, getRFC7009Endpoint, getRFC7662Endpoint, getScopes, getSecret, getServiceURI, getSkin, getSSLConfiguration, getUIURI, getWellKnownURI, isEnableAssetCleanup, isOIDCEnabled
-
-
-
-
Field Detail
-
assetProvider
protected AssetProvider assetProvider
-
assetKeys
protected OA2AssetSerializationKeys assetKeys
-
assetConverter
protected OA2AssetConverter assetConverter
-
tokenForgeProvider
protected javax.inject.Provider<org.oa4mp.delegation.common.token.TokenForge> tokenForgeProvider
-
-
Method Detail
-
getServiceProvider
public OA2MPServiceProvider getServiceProvider()
- Specified by:
getServiceProviderin interfaceClientLoaderInterface<T extends OA2ClientEnvironment>
-
createServiceClient
public edu.uiuc.ncsa.security.servlet.ServiceClient createServiceClient(URI host)
-
getWellKnownClient
public edu.uiuc.ncsa.security.servlet.ServiceClient getWellKnownClient()
-
getWellKnownString
public String getWellKnownString(String key)
Get the given value from the given key on the well-known page. This just return strings. If there is no such value, a null is returned. If the response is incorrect, an exception is thrown.- Parameters:
key-- Returns:
-
getWellKnownValue
public Object getWellKnownValue(String key)
Get a value form the well-known configuration which may be a JSON or other object. You have to process it once you have it.- Parameters:
key-- Returns:
-
getWellKnownConfiguration
public net.sf.json.JSONObject getWellKnownConfiguration()
The well-known page from the server. Cache this or every call for a configuration value can require a trip to the server. The well-known page should rarely change, so this is completely reasonable.- Returns:
-
getDSP
protected javax.inject.Provider<org.oa4mp.delegation.client.DelegationService> getDSP()
-
createServiceURI
protected URI createServiceURI(String foundURI, String endpoint, String wellKnownEntry)
-
checkURI
protected URI checkURI(String uri, String componentName)
Checks the uri. The componentName is simply used for a more readable error messages if the uri is trivial or there is some syntax error with it.- Parameters:
uri-componentName-- Returns:
-
getAssetProvider
public AssetProvider getAssetProvider()
-
getLoggerProvider
public abstract edu.uiuc.ncsa.security.core.util.LoggerProvider getLoggerProvider()
-
getDebugger
public abstract edu.uiuc.ncsa.security.core.util.MetaDebugUtil getDebugger()
Checks for and sets up the debugging for this loader. Once this is set up, you may have to tell any environments that use it that debugging is enabled. Note that this is not used in this module, but in OA4MP proper, but has to b here for visibility later.
-
getDebugger
protected edu.uiuc.ncsa.security.core.util.MetaDebugUtil getDebugger(String debugLevel)
-
-