public interface OAuthStrategyBase extends Serializable
| Modifier and Type | Method and Description |
|---|---|
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
|
String |
getLoginRedirectURL(String successUrl,
Map<String,String> requestParams)
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
|
String getLoginRedirectURL(String successUrl) throws Exception
successUrl - the call back url on which user will be redirected after
authenticationExceptionString getLoginRedirectURL(String successUrl, Map<String,String> requestParams) throws Exception
successUrl - the call back url on which user will be redirected after
authenticationrequestParams - parameters need to pass in requestExceptionAccessGrant verifyResponse(Map<String,String> requestParams) throws Exception
requestParams - request parameters, received from the providerExceptionAccessGrant verifyResponse(Map<String,String> requestParams, String methodType) throws Exception
requestParams - methodType - ExceptionResponse executeFeed(String url) throws Exception
url - URL to make HTTP request.ExceptionResponse executeFeed(String url, String methodType, Map<String,String> params, Map<String,String> headerParams, String body) throws Exception
url - 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 BodyExceptionvoid setPermission(Permission permission)
permission - Permission object which can be Permission.AUHTHENTICATE_ONLY,
Permission.ALL, Permission.DEFAULTvoid setScope(String scope)
scope - scope stringvoid setAccessGrant(AccessGrant accessGrant)
accessGrant - It contains the access token and other informationExceptionvoid setAccessTokenParameterName(String accessTokenParameterName)
accessTokenParameterName - void logout()
Response uploadImage(String url, String methodType, Map<String,String> params, Map<String,String> headerParams, String fileName, InputStream inputStream, String fileParamName) throws Exception
url - 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.ExceptionAccessGrant getAccessGrant()
Copyright © 2018. All Rights Reserved.