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 boolean
getConfigPropertyBooleanValue(java.lang.String name)
The boolean value for the property.int
getConfigPropertyIntValue(java.lang.String name)
Returns the first integer value for the property if any.java.lang.String
getConfigPropertyValue(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.ClassLoader
getPluginClassLoader()
Return a class loader suitable for loading other customer plugin classes defined in the configuration.abstract java.lang.String
getUniqueId()
Returns a unique identifier representing this configuration instance.void
putConfigPropertyValues(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_SECONDS
property: 604800
-
CODE_LIFETIME_SECONDS
public static final java.lang.String[] CODE_LIFETIME_SECONDS
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_CODE_LIFETIME_SECONDS
property: 60
-
CODE_LENGTH
public static final java.lang.String[] CODE_LENGTH
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_CODE_LENGTH
property: 30
-
TOKEN_LIFETIME_SECONDS
public static final java.lang.String[] TOKEN_LIFETIME_SECONDS
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_TOKEN_LIFETIME_SECONDS
property: 3600
-
ACCESS_TOKEN_LENGTH
public static final java.lang.String[] ACCESS_TOKEN_LENGTH
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_ACCESS_TOKEN_LENGTH
property: 40
-
ISSUE_REFRESH_TOKEN
public static final java.lang.String[] ISSUE_REFRESH_TOKEN
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_ISSUE_REFRESH_TOKEN
property: true
-
REFRESH_TOKEN_LENGTH
public static final java.lang.String[] REFRESH_TOKEN_LENGTH
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_REFRESH_TOKEN_LENGTH
property: 50
-
ACCESS_TOKENTYPEHANDLER_CLASSNAME
public static final java.lang.String[] 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
public static final java.lang.String[] MEDIATOR_CLASSNAMES
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_MEDIATOR_CLASSNAMES
property: 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_CLIENTS
property: false
-
GRANT_TYPES_ALLOWED
public static final java.lang.String[] GRANT_TYPES_ALLOWED
Sample config value for theOAuthComponentConfigurationConstants.OAUTH20_GRANT_TYPES_ALLOWED
property: 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: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
public java.lang.String getConfigPropertyValue(java.lang.String name)
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
public java.lang.String[] getConfigPropertyValues(java.lang.String name)
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
public int getConfigPropertyIntValue(java.lang.String name)
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
public boolean getConfigPropertyBooleanValue(java.lang.String name)
Description copied from interface:OAuthComponentConfiguration
The boolean value for the property.- Specified by:
getConfigPropertyBooleanValue
in interfaceOAuthComponentConfiguration
- Returns:
- the boolean value for the property.
-
getUniqueId
public abstract java.lang.String 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 .
-
-