|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.brickred.socialauth.AbstractProvider
org.brickred.socialauth.provider.InstagramImpl
public class InstagramImpl
Provider implementation for Instagram
| Field Summary | |
|---|---|
static String |
CLASSID
|
| 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 | |
|---|---|
InstagramImpl(OAuthConfig providerConfig)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.brickred.socialauth.AbstractProvider |
|---|
getPlugin, getPluginsScope, isSupportedPlugin, refreshToken, registerPlugins |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CLASSID
| Constructor Detail |
|---|
public InstagramImpl(OAuthConfig providerConfig)
throws Exception
Exception| Method Detail |
|---|
public Response api(String url,
String methodType,
Map<String,String> params,
Map<String,String> headerParams,
String body)
throws Exception
AuthProvider
url - 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 Body
Exceptionpublic AccessGrant getAccessGrant()
AuthProvider
public List<Contact> getContactList()
throws Exception
AuthProvider
Exception
public String getLoginRedirectURL(String successUrl)
throws Exception
AuthProvider
Exceptionpublic String getProviderId()
AuthProvider
public Profile getUserProfile()
throws Exception
AuthProvider
Exceptionpublic void logout()
AuthProvider
public void setAccessGrant(AccessGrant accessGrant)
throws AccessTokenExpireException
AuthProvider
accessGrant - It contains the access token and other information
AccessTokenExpireExceptionpublic void setPermission(Permission p)
p - Permission object which can be Permission.AUHTHENTICATE_ONLY,
Permission.ALL, Permission.DEFAULT
public Response updateStatus(String msg)
throws Exception
AuthProvider
msg - Message to be shown as user's status
Exception
public Response uploadImage(String message,
String fileName,
InputStream inputStream)
throws Exception
AuthProvider
message - Status MessagefileName - Image file nameinputStream - Input Stream of image
Exception
public Profile verifyResponse(Map<String,String> requestParams)
throws Exception
AuthProvider
requestParams - Request parameters received from the provider
Exceptionprotected OAuthStrategyBase getOauthStrategy()
AbstractProvider
getOauthStrategy in class AbstractProviderprotected List<String> getPluginsList()
AbstractProvider
getPluginsList in class AbstractProvider
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||