Skip to content

Latest commit

 

History

History
60 lines (39 loc) · 2.94 KB

OAuthToken.md

File metadata and controls

60 lines (39 loc) · 2.94 KB

OAuthToken

implements Token

This class maintains the tokens and authenticates every request.

Package com.zoho.api.authenticator

The Zoho CRM OAuth 2.0 reference provides information about the possible operations on OAuth 2.0.

Constructors

Constructor Description
OAuthToken(String clientID, String clientSecret, String token, TokenType type) Creates an OAuthToken class instance with the specified parameters.
OAuthToken(String clientID, String clientSecret, String token, TokenType type, String redirectURL) Creates an OAuthToken class instance with the specified parameters.

clientID

A String containing the OAuth client id.

clientSecret

A String containing the OAuth client secret.

token

A String containing the REFRESH/GRANT token.

TokenType

An enum containing the given token type.

GRANT -> When Grant Token is given in the token.

REFRESH -> When Refresh Token is given in the token.

redirectURL

A String containing the OAuth redirect URL.

Methods

Return Type Method Description
String getClientID() The getter method to get OAuth ClientID.
String getClientSecret() The getter method to get OAuth ClientSecret.
String getRedirectURL() The getter method to get OAuth RedirectURL.
String getGrantToken() The getter method to get OAuth GrantToken.
String getRefreshToken() The getter method to get OAuth RefreshToken.
void setRefreshToken(String refreshToken) The setter method to set OAuth RefreshToken.
String getAccessToken() The getter method to get OAuth AccessToken.
void setAccessToken(String accessToken) The setter method to set OAuth AccessToken.
String getExpiresIn() The getter method to get OAuth ExpiresIn.
void setExpiresIn(String expiresIn) The setter method to set OAuth ExpiresIn.
Boolean remove() The method to remove the current token from the Store.

source