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
FieldsModifier and TypeFieldDescriptionstatic final String[]Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_ACCESS_TOKEN_LENGTHproperty: 40static final String[]Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_ACCESS_TOKENTYPEHANDLER_CLASSNAMEproperty to use internal default token type handler.static final String[]Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_ALLOW_PUBLIC_CLIENTSproperty: falsestatic final String[]Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_CODE_LENGTHproperty: 30static final String[]Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_CODE_LIFETIME_SECONDSproperty: 60static final String[]Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_GRANT_TYPES_ALLOWEDproperty: allows all grant and token typesstatic final String[]Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_ISSUE_REFRESH_TOKENproperty: truestatic final String[]Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_MAX_AUTHORIZATION_GRANT_LIFETIME_SECONDSproperty: 604800static final String[]Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_MEDIATOR_CLASSNAMESproperty: null, to use internal default mediator which does nothing.static final String[]Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_REFRESH_TOKEN_LENGTHproperty: 50static final String[]Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_TOKEN_LIFETIME_SECONDSproperty: 3600 -
Constructor Summary
ConstructorsConstructorDescriptionPopulates the configuration map with all our default values. -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe boolean value for the property.intReturns 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 StringReturns a unique identifier representing this configuration instance.voidputConfigPropertyValues(String property, String[] values)
-
Field Details
-
MAX_AUTHORIZATION_GRANT_LIFEIMTE_SECONDS
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_MAX_AUTHORIZATION_GRANT_LIFETIME_SECONDSproperty: 604800 -
CODE_LIFETIME_SECONDS
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_CODE_LIFETIME_SECONDSproperty: 60 -
CODE_LENGTH
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_CODE_LENGTHproperty: 30 -
TOKEN_LIFETIME_SECONDS
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_TOKEN_LIFETIME_SECONDSproperty: 3600 -
ACCESS_TOKEN_LENGTH
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_ACCESS_TOKEN_LENGTHproperty: 40 -
ISSUE_REFRESH_TOKEN
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_ISSUE_REFRESH_TOKENproperty: true -
REFRESH_TOKEN_LENGTH
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_REFRESH_TOKEN_LENGTHproperty: 50 -
ACCESS_TOKENTYPEHANDLER_CLASSNAME
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_ACCESS_TOKENTYPEHANDLER_CLASSNAMEproperty 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_CLASSNAMESproperty: null, to use internal default mediator which does nothing. -
ALLOW_PUBLIC_CLIENTS
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_ALLOW_PUBLIC_CLIENTSproperty: false -
GRANT_TYPES_ALLOWED
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_GRANT_TYPES_ALLOWEDproperty: 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:OAuthComponentConfigurationReturn a class loader suitable for loading other customer plugin classes defined in the configuration.- Specified by:
getPluginClassLoaderin interfaceOAuthComponentConfiguration- Returns:
- a class loader suitable for loading other customer plugin classes.
-
getConfigPropertyValue
Description copied from interface:OAuthComponentConfigurationReturns the first string value for the property if any.- Specified by:
getConfigPropertyValuein interfaceOAuthComponentConfiguration- Returns:
- the first string value for the property if any.
-
getConfigPropertyValues
Description copied from interface:OAuthComponentConfigurationThe Array of string values for the property.- Specified by:
getConfigPropertyValuesin interfaceOAuthComponentConfiguration- Returns:
- the array of string values for the property.
-
getConfigPropertyIntValue
Description copied from interface:OAuthComponentConfigurationReturns the first integer value for the property if any.- Specified by:
getConfigPropertyIntValuein interfaceOAuthComponentConfiguration- Returns:
- the first integer value for the property if any.
-
getConfigPropertyBooleanValue
Description copied from interface:OAuthComponentConfigurationThe boolean value for the property.- Specified by:
getConfigPropertyBooleanValuein interfaceOAuthComponentConfiguration- Returns:
- the boolean value for the property.
-
getUniqueId
Description copied from interface:OAuthComponentConfigurationReturns 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:
getUniqueIdin 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 .
-