public class SocialAuthConfig extends Object implements Serializable
| Constructor and Description |
|---|
SocialAuthConfig() |
| Modifier and Type | Method and Description |
|---|---|
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() |
boolean |
isSaveRawResponse()
Returns status to save the raw response for profile and contacts.
|
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.
|
void |
setSaveRawResponse(boolean saveRawResponse)
Set this flag to True if raw response should be save for profile and
contacts.
|
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 propertiesExceptionpublic void load(InputStream inputStream) throws Exception
inputStream - property file input stream which contains the configuration.Exceptionpublic void load(Properties properties) throws Exception
properties - application configuration propertiesExceptionpublic void load(String fileName) throws Exception
fileName - the file name which contains the application configuration
propertiesExceptionpublic void load()
throws Exception
Exceptionpublic 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.Exceptionpublic OAuthConfig getProviderConfig(String id) throws SocialAuthException, SocialAuthConfigurationException
id - the provider idSocialAuthExceptionSocialAuthConfigurationExceptionprotected boolean isConfigSetup()
public boolean isSaveRawResponse()
public void setSaveRawResponse(boolean saveRawResponse)
saveRawResponse - flag to config whether raw response should be saved or not.Copyright © 2018. All Rights Reserved.