Package org.oa4mp.client.loader
Class OA2ClientLoader<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>
-
- org.oa4mp.client.loader.OA2ClientLoader<T>
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.util.ConfigurationLoader<T>
,edu.uiuc.ncsa.security.core.Version
,Serializable
,ClientLoaderInterface<T>
public class OA2ClientLoader<T extends ClientEnvironment> extends AbstractClientLoader<T>
Created by Jeff Gaynor
on 6/4/13 at 4:34 PM- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Collection<String>
scopes
-
Fields inherited from class org.oa4mp.client.api.loader.AbstractClientLoader
ASSET_ENDPOINT, assetStoreProvider, defaultCertLifetime, defaultMaxAssetLifetime, dsp
-
Fields inherited from class org.oa4mp.delegation.common.servlet.DBConfigLoader
derbyConnectionPoolProvider
-
-
Constructor Summary
Constructors Constructor Description OA2ClientLoader(org.apache.commons.configuration.tree.ConfigurationNode node)
OA2ClientLoader(org.apache.commons.configuration.tree.ConfigurationNode node, edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger)
Constructor to inject a logger.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description T
createInstance()
T
createInstance(javax.inject.Provider<TokenForge> tokenForgeProvider, javax.inject.Provider<Client> clientProvider, HashMap<String,String> constants)
Factory method.Map<String,List<String>>
getAdditionalParameters()
AssetProvider
getAssetProvider()
javax.inject.Provider<AssetStore>
getAssetStoreProvider()
HashMap<String,String>
getConstants()
URI
getDeviceAuthorizationURI()
protected javax.inject.Provider<DelegationService>
getDSP()
protected String
getErrorPagePath()
edu.uiuc.ncsa.security.util.jwk.JWKUtil2
getJwkUtil()
edu.uiuc.ncsa.security.util.jwk.JSONWebKeys
getKeys()
protected edu.uiuc.ncsa.security.util.jwk.JSONWebKeys
getKeysFromFile()
Check if there is a JWK specified as a fileprotected edu.uiuc.ncsa.security.util.jwk.JSONWebKeys
getKeysFromString()
Check if there is JWK specified directly (as a string of JSON) in the configuration.String
getKID()
protected String
getRedirectPagePath()
URI
getRFC7009Endpoint()
URI
getRFC7662Endpoint()
Collection<String>
getScopes()
String
getSecret()
OA4MPServiceProvider
getServiceProvider()
The provider that creates an instance of theOA4MPService
protected String
getSuccessPagePath()
URI
getUIURI()
String
getVersionString()
protected boolean
hasJWKS()
boolean
isOIDCEnabled()
boolean
isShowIDToken()
Deprecated.protected boolean
isShowRedirectPage()
Boolean
isUseBasicAuth()
Deprecated.void
setJwkUtil(edu.uiuc.ncsa.security.util.jwk.JWKUtil2 jwkUtil)
void
setUseBasicAuth(Boolean useBasicAuth)
-
Methods inherited from class org.oa4mp.client.api.loader.AbstractClientLoader
checkProtocol, checkURI, createServiceClient, createServiceURI, createServiceURIOLD, getAccessTokenURI, getAssetURI, getAuthorizeURI, getCallback, getCertLifetime, getCfgValue, getId, getIssuer, getKeypairLifetime, getMaxAssetLifetime, getServiceURI, getSkin, getSSLConfiguration, getWellKnownClient, getWellKnownConfiguration, getWellKnownString, getWellKnownURI, getWellKnownValue, isEnableAssetCleanup, load
-
Methods inherited from class org.oa4mp.delegation.common.servlet.DBConfigLoader
getDerbyConnectionPoolProvider, getDerbyConnectionPoolProvider, getMariaDBConnectionPoolProvider, getMariaDBConnectionPoolProvider, getMySQLConnectionPoolProvider, getMySQLConnectionPoolProvider, getPgConnectionPoolProvider, getPgConnectionPoolProvider, isDefaultStoreDisabled
-
-
-
-
Field Detail
-
scopes
protected Collection<String> scopes
-
-
Constructor Detail
-
OA2ClientLoader
public OA2ClientLoader(org.apache.commons.configuration.tree.ConfigurationNode node)
-
OA2ClientLoader
public OA2ClientLoader(org.apache.commons.configuration.tree.ConfigurationNode node, edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger)
Constructor to inject a logger.- Parameters:
node
-logger
-
-
-
Method Detail
-
getVersionString
public String getVersionString()
- Specified by:
getVersionString
in classedu.uiuc.ncsa.security.core.util.LoggingConfigLoader<T extends ClientEnvironment>
-
getServiceProvider
public OA4MPServiceProvider getServiceProvider()
Description copied from interface:ClientLoaderInterface
The provider that creates an instance of theOA4MPService
- Returns:
-
getScopes
public Collection<String> getScopes()
-
createInstance
public T createInstance(javax.inject.Provider<TokenForge> tokenForgeProvider, javax.inject.Provider<Client> clientProvider, HashMap<String,String> constants)
Factory method. Override this to create the actual instance as needed.- Parameters:
tokenForgeProvider
-clientProvider
-constants
-- Returns:
-
getAssetProvider
public AssetProvider getAssetProvider()
- Specified by:
getAssetProvider
in classAbstractClientLoader<T extends ClientEnvironment>
-
isShowIDToken
public boolean isShowIDToken()
Deprecated.An option for the (demo) client that specifies that the user should be shown the ID token at some point. Default isfalse
.
This is really old and was used in OAuth 1.0a demos. It would stop the flow and let the user inspect the id token, then allow the flow to continue. It should probably get tracked down and removed The current default client shows the ID token every time, so this really is not needed.- Returns:
-
isOIDCEnabled
public boolean isOIDCEnabled()
-
getAssetStoreProvider
public javax.inject.Provider<AssetStore> getAssetStoreProvider()
- Specified by:
getAssetStoreProvider
in interfaceClientLoaderInterface<T extends ClientEnvironment>
- Overrides:
getAssetStoreProvider
in classAbstractClientLoader<T extends ClientEnvironment>
-
getErrorPagePath
protected String getErrorPagePath()
-
getSecret
public String getSecret()
-
getKID
public String getKID()
-
getKeysFromFile
protected edu.uiuc.ncsa.security.util.jwk.JSONWebKeys getKeysFromFile()
Check if there is a JWK specified as a file- Returns:
-
getKeysFromString
protected edu.uiuc.ncsa.security.util.jwk.JSONWebKeys getKeysFromString()
Check if there is JWK specified directly (as a string of JSON) in the configuration.- Returns:
-
getJwkUtil
public edu.uiuc.ncsa.security.util.jwk.JWKUtil2 getJwkUtil()
-
setJwkUtil
public void setJwkUtil(edu.uiuc.ncsa.security.util.jwk.JWKUtil2 jwkUtil)
-
getKeys
public edu.uiuc.ncsa.security.util.jwk.JSONWebKeys getKeys()
-
hasJWKS
protected boolean hasJWKS()
-
getSuccessPagePath
protected String getSuccessPagePath()
-
getRedirectPagePath
protected String getRedirectPagePath()
-
isShowRedirectPage
protected boolean isShowRedirectPage()
-
createInstance
public T createInstance()
-
isUseBasicAuth
public Boolean isUseBasicAuth()
Deprecated.For calls the client makes to the service, use HTTP Basic Authorization rather than passing in the credentials as parameters. Both should be supported, but some other services might only allow for this. This feature is (probably) unused and should be removed at some point.- Returns:
-
setUseBasicAuth
public void setUseBasicAuth(Boolean useBasicAuth)
-
getDSP
protected javax.inject.Provider<DelegationService> getDSP()
- Specified by:
getDSP
in classAbstractClientLoader<T extends ClientEnvironment>
-
getUIURI
public URI getUIURI()
-
getDeviceAuthorizationURI
public URI getDeviceAuthorizationURI()
-
getRFC7009Endpoint
public URI getRFC7009Endpoint()
-
getRFC7662Endpoint
public URI getRFC7662Endpoint()
-
-