public abstract class AbstractProvider extends Object implements AuthProvider, Serializable
COUNTRY, DOB, EMAIL, EXT_NAMESPACE, FIRST_NAME, FULL_NAME, GENDER, LANGUAGE, LAST_NAME, NICK_NAME, POSTCODE| Constructor and Description |
|---|
AbstractProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract OAuthStrategyBase |
getOauthStrategy()
Returns the OAuthStrategyBase of a provider.
|
<T> T |
getPlugin(Class<T> clazz)
Returns the required plugin if provider support that.
|
protected abstract List<String> |
getPluginsList()
Returns the list of plugins of a provider.
|
String |
getPluginsScope(OAuthConfig oauthConfig)
Returns the scopes of custom plugins of a provider those are configured
in properties file
|
boolean |
isSupportedPlugin(Class<? extends Plugin> clazz)
Returns True if provider support given plugin otherwise returns False
|
void |
refreshToken(AccessGrant accessGrant)
Makes a call for a provider to get RefreshToken and returns object of
that provider
|
void |
registerPlugins()
Registers plugin for a provider those are configured in configuration
properties or mentioned in provider implementation.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapi, getAccessGrant, getContactList, getLoginRedirectURL, getProviderId, getUserProfile, logout, setAccessGrant, setPermission, updateStatus, uploadImage, verifyResponsepublic <T> T getPlugin(Class<T> clazz) throws Exception
AuthProvidergetPlugin in interface AuthProviderclazz - Fully qualified plugin class name e.g
org.brickred.socialauth.plugin.FeedPlugin.classExceptionpublic boolean isSupportedPlugin(Class<? extends Plugin> clazz)
AuthProviderisSupportedPlugin in interface AuthProviderclazz - Fully qualified plugin class name e.g
org.brickred.socialauth.plugin.FeedPlugin.classpublic final void registerPlugins()
throws Exception
AuthProviderregisterPlugins in interface AuthProviderExceptionpublic void refreshToken(AccessGrant accessGrant) throws SocialAuthException
AuthProviderrefreshToken in interface AuthProvideraccessGrant - AccessGrant which contains AccessTokenSocialAuthExceptionpublic String getPluginsScope(OAuthConfig oauthConfig)
oauthConfig - OAuthConfig object of that providerprotected abstract List<String> getPluginsList()
protected abstract OAuthStrategyBase getOauthStrategy()
Copyright © 2018. All Rights Reserved.