public class InstagramImpl extends AbstractProvider
| Modifier and Type | Field and Description |
|---|---|
static String |
CLASSID |
COUNTRY, DOB, EMAIL, EXT_NAMESPACE, FIRST_NAME, FULL_NAME, GENDER, LANGUAGE, LAST_NAME, NICK_NAME, POSTCODE| Constructor and Description |
|---|
InstagramImpl(OAuthConfig providerConfig) |
| Modifier and Type | Method and Description |
|---|---|
Response |
api(String url,
String methodType,
Map<String,String> params,
Map<String,String> headerParams,
String body)
Makes OAuth signed HTTP request to a given URL for making any provider
specific calls.
|
AccessGrant |
getAccessGrant()
Retrieves the AccessGrant object.
|
List<Contact> |
getContactList()
Gets the list of contacts of the user and their email.
|
String |
getLoginRedirectURL(String successUrl)
This is the most important action.
|
protected OAuthStrategyBase |
getOauthStrategy()
Returns the OAuthStrategyBase of a provider.
|
protected List<String> |
getPluginsList()
Returns the list of plugins of a provider.
|
String |
getProviderId()
Retrieves the provider id
|
Profile |
getUserProfile()
Retrieves the user profile.
|
void |
logout()
Logout
|
void |
setAccessGrant(AccessGrant accessGrant)
Stores access grant for the provider *
|
void |
setPermission(Permission p) |
Response |
updateStatus(String msg)
Updates the status on the chosen provider if available.
|
Response |
uploadImage(String message,
String fileName,
InputStream inputStream)
Updates the image and message on the chosen provider if available.
|
Profile |
verifyResponse(Map<String,String> requestParams)
Verifies the user when the external provider redirects back to our
application.
|
getPlugin, getPluginsScope, isSupportedPlugin, refreshToken, registerPluginspublic static final String CLASSID
public InstagramImpl(OAuthConfig providerConfig) throws Exception
Exceptionpublic Response api(String url, String methodType, Map<String,String> params, Map<String,String> headerParams, String body) throws Exception
AuthProviderurl - URL to make HTTP request.methodType - Method type can be GET, POST or PUTparams - Any additional parameters whose signature need to compute.
Only used in case of "POST" and "PUT" method type.headerParams - Any additional parameters need to pass as Header Parametersbody - Request BodyExceptionpublic AccessGrant getAccessGrant()
AuthProviderpublic List<Contact> getContactList() throws Exception
AuthProviderExceptionpublic String getLoginRedirectURL(String successUrl) throws Exception
AuthProviderExceptionpublic String getProviderId()
AuthProviderpublic Profile getUserProfile() throws Exception
AuthProviderExceptionpublic void logout()
AuthProviderpublic void setAccessGrant(AccessGrant accessGrant) throws AccessTokenExpireException
AuthProvideraccessGrant - It contains the access token and other informationAccessTokenExpireExceptionpublic void setPermission(Permission p)
p - Permission object which can be Permission.AUHTHENTICATE_ONLY,
Permission.ALL, Permission.DEFAULTpublic Response updateStatus(String msg) throws Exception
AuthProvidermsg - Message to be shown as user's statusExceptionpublic Response uploadImage(String message, String fileName, InputStream inputStream) throws Exception
AuthProvidermessage - Status MessagefileName - Image file nameinputStream - Input Stream of imageExceptionpublic Profile verifyResponse(Map<String,String> requestParams) throws Exception
AuthProviderrequestParams - Request parameters received from the providerExceptionprotected OAuthStrategyBase getOauthStrategy()
AbstractProvidergetOauthStrategy in class AbstractProviderprotected List<String> getPluginsList()
AbstractProvidergetPluginsList in class AbstractProviderCopyright © 2018. All Rights Reserved.