public class ClientEnvironment extends AbstractClientEnvironment
Created by Jeff Gaynor
on May 16, 2011 at 3:27:56 PM
Modifier and Type | Field and Description |
---|---|
protected URI |
accessTokenUri |
protected URI |
authorizationUri |
protected URI |
callback |
static String |
CALLBACK_URI_KEY |
protected Client |
client |
protected javax.inject.Provider<Client> |
cp |
protected String |
errorPagePath |
static String |
FORM_ENCODING |
protected URI |
initializeUri |
protected String |
privKeyString |
protected String |
redirectPagePath |
protected URI |
resourceServerUri |
protected String |
skin |
protected String |
successPagePath |
protected javax.inject.Provider<TokenForge> |
tfp |
static String |
TOKEN |
static String |
VERIFIER |
CERT_LIFETIME_KEY, CERT_REQUEST_KEY
constants
Constructor and Description |
---|
ClientEnvironment(MyLoggingFacade logger,
Map<String,String> constants,
URI accessTokenUri,
URI authorizationUri,
URI callback,
URI initializeUri,
URI resourceServerUri,
long certLifetime,
String clientId,
PrivateKey privateKey,
PublicKey publicKey,
String skin,
boolean enableAssetCleanup,
long maxAssetLifetime,
long keypairLifetime,
AssetProvider assetProvider,
javax.inject.Provider<Client> clientProvider,
javax.inject.Provider<TokenForge> tokenForgeProvider,
javax.inject.Provider<DelegationService> delegationServiceProvider,
javax.inject.Provider<AssetStore> assetStoreProvider,
boolean showRedirectPage,
String errorPagePath,
String redirectPagePath,
String successPagePath)
Main constructor called by the loader.
|
ClientEnvironment(URI accessTokenUri,
URI authorizationUri,
URI callback,
long certLifetime,
String clientId,
DelegationService delegationService,
URI initializeUri,
PrivateKey privateKey,
PublicKey publicKey,
URI resourceServerUri,
TokenForge tokenForge,
AssetStore assetStore,
boolean showRedirectPage,
String errorPagePath,
String redirectPagePath,
String successPagePath)
Used mostly for testing.
|
Modifier and Type | Method and Description |
---|---|
URI |
getAccessTokenUri()
The endpoint for this client for retrieving an access token.
|
AssetProvider |
getAssetProvider() |
AssetStore |
getAssetStore()
Returns the configured
AssetStore for this environment or null if
there is none. |
URI |
getAuthorizationUri()
The endpoint for this client allowing authorization of the user.
|
URI |
getCallback()
The callback for this environment.
NOTE Generally this is specified in the configuration file and is the same for every request. |
long |
getCertLifetime()
The certificate lifetime request.
|
Client |
getClient()
A
Client object representing the instance of this service. |
String |
getClientId()
The identifier for this client to the given server.
|
DelegationService |
getDelegationService()
The
OA4MPService , fully configured and operational. |
String |
getErrorPagePath() |
URI |
getInitializeUri()
The endpoint for this client that starts delegation.
|
long |
getKeypairLifetime() |
long |
getMaxAssetLifetime() |
PrivateKey |
getPrivateKey()
The private key for this client.
|
protected String |
getPrivKeyString()
Internal call to convert the private key.
|
PublicKey |
getPublicKey()
The generated public key for this client.
|
String |
getRedirectPagePath() |
URI |
getResourceServerUri()
The endpoint for this client for getting the resource (i.e., certificate chain).
|
String |
getSkin()
Optional skinning option.
|
String |
getSuccessPagePath() |
TokenForge |
getTokenForge()
Internal call to the forge (a type of factory) that processing tokens returned from the
server.
|
boolean |
hasAssetStore()
Returns
true if a store has been configured for this environment and
false otherwise. |
boolean |
isEnableAssetCleanup() |
boolean |
isShowRedirectPage() |
void |
setAssetProvider(AssetProvider assetProvider) |
void |
setCallback(URI callback) |
void |
setCertLifetime(long newCertLifetime) |
void |
setErrorPagePath(String errorPagePath) |
void |
setRedirectPagePath(String redirectPagePath) |
void |
setSuccessPagePath(String successPagePath) |
debug, error, getConstants, getMyLogger, info, isDebugOn, isPingable, setDebugOn, setPingable, warn
public static final String CALLBACK_URI_KEY
public static final String TOKEN
public static final String FORM_ENCODING
public static final String VERIFIER
protected URI accessTokenUri
protected URI authorizationUri
protected URI initializeUri
protected URI resourceServerUri
protected URI callback
protected String privKeyString
protected javax.inject.Provider<Client> cp
protected javax.inject.Provider<TokenForge> tfp
protected Client client
protected String skin
protected String errorPagePath
protected String successPagePath
protected String redirectPagePath
public ClientEnvironment(URI accessTokenUri, URI authorizationUri, URI callback, long certLifetime, String clientId, DelegationService delegationService, URI initializeUri, PrivateKey privateKey, PublicKey publicKey, URI resourceServerUri, TokenForge tokenForge, AssetStore assetStore, boolean showRedirectPage, String errorPagePath, String redirectPagePath, String successPagePath)
accessTokenUri
- authorizationUri
- callback
- certLifetime
- clientId
- delegationService
- initializeUri
- privateKey
- publicKey
- resourceServerUri
- tokenForge
- assetStore
- public ClientEnvironment(MyLoggingFacade logger, Map<String,String> constants, URI accessTokenUri, URI authorizationUri, URI callback, URI initializeUri, URI resourceServerUri, long certLifetime, String clientId, PrivateKey privateKey, PublicKey publicKey, String skin, boolean enableAssetCleanup, long maxAssetLifetime, long keypairLifetime, AssetProvider assetProvider, javax.inject.Provider<Client> clientProvider, javax.inject.Provider<TokenForge> tokenForgeProvider, javax.inject.Provider<DelegationService> delegationServiceProvider, javax.inject.Provider<AssetStore> assetStoreProvider, boolean showRedirectPage, String errorPagePath, String redirectPagePath, String successPagePath)
logger
- constants
- accessTokenUri
- authorizationUri
- callback
- initializeUri
- resourceServerUri
- certLifetime
- clientId
- privateKey
- publicKey
- clientProvider
- tokenForgeProvider
- delegationServiceProvider
- assetStoreProvider
- public boolean hasAssetStore()
true
if a store has been configured for this environment and
false
otherwise. Check this before using the store.public AssetStore getAssetStore()
AssetStore
for this environment or null
if
there is none.hasAssetStore()
public AssetProvider getAssetProvider()
public void setAssetProvider(AssetProvider assetProvider)
public URI getAccessTokenUri()
public URI getAuthorizationUri()
public URI getInitializeUri()
public URI getResourceServerUri()
public TokenForge getTokenForge()
public DelegationService getDelegationService()
OA4MPService
, fully configured and operational.public URI getCallback()
setCallback(java.net.URI)
.public void setCallback(URI callback)
public String getClientId()
public PrivateKey getPrivateKey()
getPublicKey()
public PublicKey getPublicKey()
protected String getPrivKeyString()
public Client getClient()
Client
object representing the instance of this service.public long getCertLifetime()
setCertLifetime(long)
public void setCertLifetime(long newCertLifetime)
public String getSkin()
public long getKeypairLifetime()
public long getMaxAssetLifetime()
public boolean isEnableAssetCleanup()
public boolean isShowRedirectPage()
public String getErrorPagePath()
public void setErrorPagePath(String errorPagePath)
public String getSuccessPagePath()
public void setSuccessPagePath(String successPagePath)
public String getRedirectPagePath()
public void setRedirectPagePath(String redirectPagePath)
Copyright © 2019. All Rights Reserved.