LIBVER
LIBVER
The Google API Client https://github.com/google/google-api-php-client
createAuthUrl(string|array $scope = null) : string
Create a URL to obtain user authorization.
The authorization endpoint allows the user to first authenticate, and then grant/deny the access request.
string|array | $scope | The scope is expressed as an array or list of space-delimited strings. |
authorize(\GuzzleHttp\ClientInterface $http = null) : \GuzzleHttp\ClientInterface
Adds auth listeners to the HTTP client based on the credentials set in the Google API Client object
\GuzzleHttp\ClientInterface | $http | the http client object. |
the http client object
setRequestVisibleActions(array $requestVisibleActions)
If 'plus.login' is included in the list of requested scopes, you can use this method to define types of app activities that your app will write.
You can find a list of available types here:
array | $requestVisibleActions | Array of app activity types |
setIncludeGrantedScopes( $include)
If this is provided with the value true, and the authorization request is granted, the authorization will include any previous authorizations granted to this user/application combination for other scopes.
$include | boolean - the URL-space to use. |
revokeToken(string|null $token = null) : boolean
Revoke an OAuth2 access token or refresh token. This method will revoke the current access token, if a token isn't provided.
string|null | $token | The token (access token or a refresh token) that should be revoked. |
Returns True if the revocation was successful, otherwise False.
verifyIdToken(string|null $idToken = null) : array|false
Verify an id_token. This method will verify the current id_token, if one isn't provided.
string|null | $idToken | The token (id_token) that should be verified. |
Returns the token payload as an array if the verification was successful, false otherwise.
addScope( $scope_or_scopes)
This functions adds a scope to be requested as part of the OAuth2.0 flow.
Will append any scopes not previously requested to the scope parameter. A single string will be treated as a scope to request. An array of strings will each be appended.
$scope_or_scopes | string|array e.g. "profile" |
execute( $request, $expectedClass = null) : object
Helper method to execute deferred HTTP requests.
$request | Psr\Http\Message\RequestInterface|Google_Http_Batch |
|
$expectedClass |
of the type of the expected class or Psr\Http\Message\ResponseInterface.
setAuthConfig(string|array $config)
Set the auth config from new or deprecated JSON config.
This structure should match the file downloaded from the "Download JSON" button on in the Google Developer Console.
string|array | $config | the configuration json |