GoogleOAuthService
in package
Class GoogleOAuthService
Table of Contents
- $apiClient : GoogleServicesApiClient
- $storage : GoogleConfigurationStorage
- __construct() : mixed
- GoogleOAuthService constructor.
- create() : GoogleOAuthService
- Named constructor of GoogleOAuthService.
- getAccessToken() : string
- Returns the google oauth access token.
Properties
$apiClient
protected
GoogleServicesApiClient
$apiClient
$storage
protected
GoogleConfigurationStorage
$storage
Methods
__construct()
GoogleOAuthService constructor.
public
__construct(GoogleConfigurationStorage $storage, GoogleServicesApiClient $apiClient) : mixed
Parameters
- $storage : GoogleConfigurationStorage
-
Access to google configurations.
- $apiClient : GoogleServicesApiClient
-
Http client to fetch new token if necessary.
Return values
mixed —create()
Named constructor of GoogleOAuthService.
public
static create([GoogleConfigurationStorage $storage = null ][, GoogleServicesApiClient $apiClient = null ]) : GoogleOAuthService
Parameters
- $storage : GoogleConfigurationStorage = null
-
Access to google configurations.
- $apiClient : GoogleServicesApiClient = null
-
Api client.
Return values
GoogleOAuthService —New instance.
getAccessToken()
Returns the google oauth access token.
public
getAccessToken() : string
If the token is already expired, a new token is exchanged with the refresh token.