GoogleOAuthHelper
Summary
Defines an helper for google OAuth association and requests.
Constructor
GoogleOAuthHelper
Syntax
GoogleOAuthHelper
()
Summary
Item Index
Properties
Methods
fetchToken
Syntax
fetchToken
-
callback
Summary
Retrieves the current token or null if it was not persisted earlier.
Parameters:
-
callback
FunctionCallback function with :
- Error The error if an error occurred, null otherwise
- Object The token object
getAuthUrl
Syntax
Summary
Builds the url that will permit to access google association page on the client's browser.
Parameters:
-
options
ObjectOptions to build the url, 'scope' is mandatory
Returns:
The url to the google association page
getFreshToken
Syntax
getFreshToken
-
callback
Summary
Retrieves a fresh (=valid) token, if a previous token was set and is still valid it is returned. If this previous token is not valid anymore a new token is retrieved. This function should be used after a previous successfull google association.
Parameters:
-
callback
FunctionCallback function with :
- Error The error if an error occurred, null otherwise
- Object The token object
hasToken
Syntax
hasToken
-
callback
Summary
Checks whether or not a previous token has been retrieved.
Parameters:
-
callback
FunctionCallback function with :
- Error The error if an error occurred, null otherwise
- Boolean true a token exists, false otherwise
persistTokenWithCode
Syntax
persistTokenWithCode
-
code
-
callback
Summary
Retrieves a token from google with an authorization code, this token is then saved for later use and can be retrieved with @see this.fetchToken.
Properties
oauth2Client
Syntax
oauth2Client
OAuth2
final
Summary
Google oauth client library.