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 java.lang.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
-
Constructor Summary
Constructors Constructor Description SampleComponentConfiguration()Populates the configuration map with all our default values.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleangetConfigPropertyBooleanValue(java.lang.String name)The boolean value for the property.intgetConfigPropertyIntValue(java.lang.String name)Returns the first integer value for the property if any.java.lang.StringgetConfigPropertyValue(java.lang.String name)Returns the first string value for the property if any.java.lang.String[]getConfigPropertyValues(java.lang.String name)The Array of string values for the property.java.lang.ClassLoadergetPluginClassLoader()Return a class loader suitable for loading other customer plugin classes defined in the configuration.abstract java.lang.StringgetUniqueId()Returns a unique identifier representing this configuration instance.voidputConfigPropertyValues(java.lang.String property, java.lang.String[] values)
-
-
-
Field Detail
-
MAX_AUTHORIZATION_GRANT_LIFEIMTE_SECONDS
public static final java.lang.String[] MAX_AUTHORIZATION_GRANT_LIFEIMTE_SECONDS
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_MAX_AUTHORIZATION_GRANT_LIFETIME_SECONDSproperty: 604800
-
CODE_LIFETIME_SECONDS
public static final java.lang.String[] CODE_LIFETIME_SECONDS
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_CODE_LIFETIME_SECONDSproperty: 60
-
CODE_LENGTH
public static final java.lang.String[] CODE_LENGTH
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_CODE_LENGTHproperty: 30
-
TOKEN_LIFETIME_SECONDS
public static final java.lang.String[] TOKEN_LIFETIME_SECONDS
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_TOKEN_LIFETIME_SECONDSproperty: 3600
-
ACCESS_TOKEN_LENGTH
public static final java.lang.String[] ACCESS_TOKEN_LENGTH
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_ACCESS_TOKEN_LENGTHproperty: 40
-
ISSUE_REFRESH_TOKEN
public static final java.lang.String[] ISSUE_REFRESH_TOKEN
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_ISSUE_REFRESH_TOKENproperty: true
-
REFRESH_TOKEN_LENGTH
public static final java.lang.String[] REFRESH_TOKEN_LENGTH
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_REFRESH_TOKEN_LENGTHproperty: 50
-
ACCESS_TOKENTYPEHANDLER_CLASSNAME
public static final java.lang.String[] 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
public static final java.lang.String[] MEDIATOR_CLASSNAMES
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_MEDIATOR_CLASSNAMESproperty: null, to use internal default mediator which does nothing.
-
ALLOW_PUBLIC_CLIENTS
public static final java.lang.String[] ALLOW_PUBLIC_CLIENTS
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_ALLOW_PUBLIC_CLIENTSproperty: false
-
GRANT_TYPES_ALLOWED
public static final java.lang.String[] GRANT_TYPES_ALLOWED
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_GRANT_TYPES_ALLOWEDproperty: allows all grant and token types
-
-
Method Detail
-
putConfigPropertyValues
public void putConfigPropertyValues(java.lang.String property, java.lang.String[] values)
-
getPluginClassLoader
public java.lang.ClassLoader 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
public java.lang.String getConfigPropertyValue(java.lang.String name)
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
public java.lang.String[] getConfigPropertyValues(java.lang.String name)
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
public int getConfigPropertyIntValue(java.lang.String name)
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
public boolean getConfigPropertyBooleanValue(java.lang.String name)
Description copied from interface:OAuthComponentConfigurationThe boolean value for the property.- Specified by:
getConfigPropertyBooleanValuein interfaceOAuthComponentConfiguration- Returns:
- the boolean value for the property.
-
getUniqueId
public abstract java.lang.String 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 .
-
-