|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.brickred.socialauth.AbstractProvider
public abstract class AbstractProvider
It implements AuthProvider interface and provides some methods for registering and getting plugins.
| Field Summary |
|---|
| Fields inherited from interface org.brickred.socialauth.AuthProvider |
|---|
COUNTRY, DOB, EMAIL, EXT_NAMESPACE, FIRST_NAME, FULL_NAME, GENDER, LANGUAGE, LAST_NAME, NICK_NAME, POSTCODE |
| Constructor Summary | |
|---|---|
AbstractProvider()
|
|
| Method Summary | ||
|---|---|---|
protected abstract OAuthStrategyBase |
getOauthStrategy()
Returns the OAuthStrategyBase of a provider. |
|
|
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. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.brickred.socialauth.AuthProvider |
|---|
api, getAccessGrant, getContactList, getLoginRedirectURL, getProviderId, getUserProfile, logout, setAccessGrant, setPermission, updateStatus, uploadImage, verifyResponse |
| Constructor Detail |
|---|
public AbstractProvider()
throws Exception
Exception| Method Detail |
|---|
public <T> T getPlugin(Class<T> clazz)
throws Exception
AuthProvider
getPlugin in interface AuthProviderclazz - Fully qualified plugin class name e.g
org.brickred.socialauth.plugin.FeedPlugin.class
Exceptionpublic boolean isSupportedPlugin(Class<? extends Plugin> clazz)
AuthProvider
isSupportedPlugin in interface AuthProviderclazz - Fully qualified plugin class name e.g
org.brickred.socialauth.plugin.FeedPlugin.class
public final void registerPlugins()
throws Exception
AuthProvider
registerPlugins in interface AuthProviderException
public void refreshToken(AccessGrant accessGrant)
throws SocialAuthException
AuthProvider
refreshToken in interface AuthProvideraccessGrant - AccessGrant which contains AccessToken
SocialAuthExceptionpublic String getPluginsScope(OAuthConfig oauthConfig)
oauthConfig - OAuthConfig object of that provider
protected abstract List<String> getPluginsList()
protected abstract OAuthStrategyBase getOauthStrategy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||