|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.brickred.socialauth.oauthstrategy.OAuth2
public class OAuth2
| Constructor Summary | |
|---|---|
OAuth2(OAuthConfig config,
Map<String,String> endpoints)
|
|
| Method Summary | |
|---|---|
Response |
executeFeed(String url)
Makes HTTP GET request to a given URL.It attaches access token in URL if required. |
Response |
executeFeed(String url,
String methodType,
Map<String,String> params,
Map<String,String> headerParams,
String body)
Makes HTTP request to a given URL.It attaches access token in URL if required. |
AccessGrant |
getAccessGrant()
Retrieves the AccessGrant object. |
String |
getLoginRedirectURL(String successUrl)
It provides the URL which will be used for authentication with the provider |
void |
logout()
Logout |
void |
setAccessGrant(AccessGrant accessGrant)
Stores access grant for the provider |
void |
setAccessTokenParameterName(String accessTokenParameterName)
Sets the name of access token parameter which will returns by the provider. |
void |
setPermission(Permission permission)
Sets the permission |
void |
setScope(String scope)
Sets the scope string |
Response |
uploadImage(String url,
String methodType,
Map<String,String> params,
Map<String,String> headerParams,
String fileName,
InputStream inputStream,
String fileParamName)
Makes HTTP request to upload image and status. |
AccessGrant |
verifyResponse(Map<String,String> requestParams)
Verifies the user and get access token |
AccessGrant |
verifyResponse(Map<String,String> requestParams,
String methodType)
Verifies the user and get access token |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OAuth2(OAuthConfig config,
Map<String,String> endpoints)
| Method Detail |
|---|
public String getLoginRedirectURL(String successUrl)
throws Exception
OAuthStrategyBase
getLoginRedirectURL in interface OAuthStrategyBasesuccessUrl - the call back url on which user will be redirected after
authentication
Exception
public AccessGrant verifyResponse(Map<String,String> requestParams)
throws Exception
OAuthStrategyBase
verifyResponse in interface OAuthStrategyBaserequestParams - request parameters, received from the provider
Exception
public AccessGrant verifyResponse(Map<String,String> requestParams,
String methodType)
throws Exception
OAuthStrategyBase
verifyResponse in interface OAuthStrategyBaseExceptionpublic void setScope(String scope)
OAuthStrategyBase
setScope in interface OAuthStrategyBasescope - scope stringpublic void setPermission(Permission permission)
OAuthStrategyBase
setPermission in interface OAuthStrategyBasepermission - Permission object which can be Permission.AUHTHENTICATE_ONLY,
Permission.ALL, Permission.DEFAULT
public Response executeFeed(String url)
throws Exception
OAuthStrategyBase
executeFeed in interface OAuthStrategyBaseurl - URL to make HTTP request.
Exception
public Response executeFeed(String url,
String methodType,
Map<String,String> params,
Map<String,String> headerParams,
String body)
throws Exception
OAuthStrategyBase
executeFeed in interface OAuthStrategyBaseurl - URL to make HTTP request.methodType - Method type can be GET, POST or PUTparams - Not using this parameter in Google API functionheaderParams - Parameters need to pass as Header Parametersbody - Request Body
Exceptionpublic void setAccessGrant(AccessGrant accessGrant)
OAuthStrategyBase
setAccessGrant in interface OAuthStrategyBaseaccessGrant - It contains the access token and other informationpublic void setAccessTokenParameterName(String accessTokenParameterName)
OAuthStrategyBase
setAccessTokenParameterName in interface OAuthStrategyBasepublic void logout()
OAuthStrategyBase
logout in interface OAuthStrategyBase
public Response uploadImage(String url,
String methodType,
Map<String,String> params,
Map<String,String> headerParams,
String fileName,
InputStream inputStream,
String fileParamName)
throws Exception
OAuthStrategyBase
uploadImage in interface OAuthStrategyBaseurl - URL to make HTTP request.methodType - Method type can be GET, POST or PUTparams - Parameters need to pass in requestheaderParams - Parameters need to pass as Header ParametersfileName - Image file nameinputStream - Input stream of imagefileParamName - Image Filename parameter. It requires in some provider.
Exceptionpublic AccessGrant getAccessGrant()
OAuthStrategyBase
getAccessGrant in interface OAuthStrategyBase
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||