Package com.ibm.oauth.core.api.config
Class SampleComponentConfiguration
java.lang.Object
com.ibm.oauth.core.api.config.SampleComponentConfiguration
- All Implemented Interfaces:
OAuthComponentConfiguration
public abstract class SampleComponentConfiguration
extends Object
implements OAuthComponentConfiguration
OAuthComponentConfiguration implementation seeded with default configuration
values. Individual values can be overridden to customize the configuration.
Classes extending this class must implement getUniqueID(), and also provide
class names for OAUTH20_CLIENT_PROVIDER_CLASSNAME and
OAUTH20_TOKEN_CACHE_CLASSNAME, at a minimum if using OAuth 2.0 features of
the component.
Extending this base class rather than directly implementing
OAuthComponentConfiguration is highly recommended. New parameters added to
the OAuthComponentConfigurationConstants may receive corresponding update in
this class with reasonable default values, which minimizes future API
incompatibility.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String[]
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_ACCESS_TOKEN_LENGTH
property: 40static final String[]
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_ACCESS_TOKENTYPEHANDLER_CLASSNAME
property to use internal default token type handler.static final String[]
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_ALLOW_PUBLIC_CLIENTS
property: falsestatic final String[]
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_CODE_LENGTH
property: 30static final String[]
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_CODE_LIFETIME_SECONDS
property: 60static final String[]
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_GRANT_TYPES_ALLOWED
property: allows all grant and token typesstatic final String[]
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_ISSUE_REFRESH_TOKEN
property: truestatic final String[]
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_MAX_AUTHORIZATION_GRANT_LIFETIME_SECONDS
property: 604800static final String[]
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_MEDIATOR_CLASSNAMES
property: null, to use internal default mediator which does nothing.static final String[]
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_REFRESH_TOKEN_LENGTH
property: 50static final String[]
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_TOKEN_LIFETIME_SECONDS
property: 3600 -
Constructor Summary
ConstructorDescriptionPopulates the configuration map with all our default values. -
Method Summary
Modifier and TypeMethodDescriptionboolean
The boolean value for the property.int
Returns the first integer value for the property if any.getConfigPropertyValue
(String name) Returns the first string value for the property if any.String[]
The Array of string values for the property.Return a class loader suitable for loading other customer plugin classes defined in the configuration.abstract String
Returns a unique identifier representing this configuration instance.void
putConfigPropertyValues
(String property, String[] values)
-
Field Details
-
MAX_AUTHORIZATION_GRANT_LIFEIMTE_SECONDS
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_MAX_AUTHORIZATION_GRANT_LIFETIME_SECONDS
property: 604800 -
CODE_LIFETIME_SECONDS
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_CODE_LIFETIME_SECONDS
property: 60 -
CODE_LENGTH
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_CODE_LENGTH
property: 30 -
TOKEN_LIFETIME_SECONDS
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_TOKEN_LIFETIME_SECONDS
property: 3600 -
ACCESS_TOKEN_LENGTH
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_ACCESS_TOKEN_LENGTH
property: 40 -
ISSUE_REFRESH_TOKEN
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_ISSUE_REFRESH_TOKEN
property: true -
REFRESH_TOKEN_LENGTH
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_REFRESH_TOKEN_LENGTH
property: 50 -
ACCESS_TOKENTYPEHANDLER_CLASSNAME
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_ACCESS_TOKENTYPEHANDLER_CLASSNAME
property to use internal default token type handler. You should not use any other value for this property. -
MEDIATOR_CLASSNAMES
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_MEDIATOR_CLASSNAMES
property: null, to use internal default mediator which does nothing. -
ALLOW_PUBLIC_CLIENTS
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_ALLOW_PUBLIC_CLIENTS
property: false -
GRANT_TYPES_ALLOWED
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_GRANT_TYPES_ALLOWED
property: allows all grant and token types
-
-
Constructor Details
-
SampleComponentConfiguration
public SampleComponentConfiguration()Populates the configuration map with all our default values.
-
-
Method Details
-
putConfigPropertyValues
-
getPluginClassLoader
Description copied from interface:OAuthComponentConfiguration
Return a class loader suitable for loading other customer plugin classes defined in the configuration.- Specified by:
getPluginClassLoader
in interfaceOAuthComponentConfiguration
- Returns:
- a class loader suitable for loading other customer plugin classes.
-
getConfigPropertyValue
Description copied from interface:OAuthComponentConfiguration
Returns the first string value for the property if any.- Specified by:
getConfigPropertyValue
in interfaceOAuthComponentConfiguration
- Returns:
- the first string value for the property if any.
-
getConfigPropertyValues
Description copied from interface:OAuthComponentConfiguration
The Array of string values for the property.- Specified by:
getConfigPropertyValues
in interfaceOAuthComponentConfiguration
- Returns:
- the array of string values for the property.
-
getConfigPropertyIntValue
Description copied from interface:OAuthComponentConfiguration
Returns the first integer value for the property if any.- Specified by:
getConfigPropertyIntValue
in interfaceOAuthComponentConfiguration
- Returns:
- the first integer value for the property if any.
-
getConfigPropertyBooleanValue
Description copied from interface:OAuthComponentConfiguration
The boolean value for the property.- Specified by:
getConfigPropertyBooleanValue
in interfaceOAuthComponentConfiguration
- Returns:
- the boolean value for the property.
-
getUniqueId
Description copied from interface:OAuthComponentConfiguration
Returns a unique identifier representing this configuration instance. This is used to logically separate instances of the OAuthComponentInstance.The implementation need ensure this UniqueId uniqueness if there are multiple OAuth service provider components.- Specified by:
getUniqueId
in interfaceOAuthComponentConfiguration
- Returns:
- a unique identifier representing an instance of the OAuth component within an java process. Typically there will only be one instance per JVM however logically there could be more if there multiple OAuth components in one JVM .
-