|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.brickred.socialauth.SocialAuthConfig
public class SocialAuthConfig
This class is used to load the configuration for all providers. Load() method is used to upload the configuration. Configuration can be loaded through InputStream, Properties or from file. An instance of this class is passed to SocialAuthManager for configuring providers.
| Constructor Summary | |
|---|---|
SocialAuthConfig()
|
|
| Method Summary | |
|---|---|
void |
addProvider(String pname,
Class<?> clazz)
Registers a new provider implementation. |
void |
addProviderConfig(String providerId,
OAuthConfig config)
Updates the provider specific configuration. |
Properties |
getApplicationProperties()
Returns the application configuration properties |
static SocialAuthConfig |
getDefault()
Returns the instance of SocialAuthConfig |
OAuthConfig |
getProviderConfig(String id)
Retrieves the configuration of given provider |
protected boolean |
isConfigSetup()
|
void |
load()
Loads the application properties from oauth_consumer.properties file. |
void |
load(InputStream inputStream)
Loads the application configuration from the given input stream Format of the input stream should be as follows: www.google.com.consumer_key = opensource.brickred.com |
void |
load(Properties properties)
Loads the application configuration from the given properties |
void |
load(String fileName)
Loads the application configuration from the given file |
void |
setApplicationProperties(Properties applicationProperties)
Setter for application configuration properties. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SocialAuthConfig()
| Method Detail |
|---|
public static SocialAuthConfig getDefault()
public void addProvider(String pname,
Class<?> clazz)
throws Exception
pname - provider name or idclazz - class name of the provider implementation.
Exceptionpublic Properties getApplicationProperties()
public void setApplicationProperties(Properties applicationProperties)
throws Exception
applicationProperties - the application configuration properties
Exception
public void load(InputStream inputStream)
throws Exception
inputStream - property file input stream which contains the configuration.
Exception
public void load(Properties properties)
throws Exception
properties - application configuration properties
Exception
public void load(String fileName)
throws Exception
fileName - the file name which contains the application configuration
properties
Exception
public void load()
throws Exception
Exception
public void addProviderConfig(String providerId,
OAuthConfig config)
throws Exception
providerId - the provider id for which configuration need to be add or
updateconfig - the OAuthConfig object which contains the configuration.
Exception
public OAuthConfig getProviderConfig(String id)
throws Exception
id - the provider id
Exceptionprotected boolean isConfigSetup()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||