Méthode | Description | |
---|---|---|
CanRefreshAccessToken ( array $credentials ) : boolean | Determines if the access token can be refreshed. | |
FormatCredentialsForHeader ( array $credentials ) : string | Formats OAuth2 credentials for use in an HTTP header. | |
FormatCredentialsForUrl ( array $credentials ) : string | Formats OAuth2 credentials for use in a URL. | |
GetAccessToken ( array $credentials, string $code, string $redirectUri = null ) : array | Gets the access token for an authorized request token. | |
GetAuthorizationUrl ( array $credentials, string $redirectUri = null, boolean $offline = null, array $params = null ) : string | Gets the authorization URL to redirect to. | |
GetOrRefreshAccessToken ( array $credentials ) : array | Get the valid access token or the token if needed and possible. | |
GetScopes ( ) : array | Gets OAuth2 scopes. | |
IsAccessTokenExpiring ( array $credentials ) : boolean | Tests if the access token is about to expire or has expired. | |
IsAccessTokenValid ( array $credentials ) : boolean | Determines if the access token is still valid. If expiry information isn't available then this function will assume it is. | |
RefreshAccessToken ( array $credentials ) : array | Refreshes the access token. | |
SetScopes ( $scopes ) | Sets OAuth2 scopes. | |
ShouldRefreshAccessToken ( array $credentials ) : boolean | Determines if the access token should be refreshed. | |
__construct ( array $scopes = null ) |
Méthode | Description | |
---|---|---|
GetAccessEndpoint ( array $params = null ) : string | Gets the access endpoint using the given server and parameters. | |
GetAuthorizeEndpoint ( array $params = null ) : string | Gets the authorization endpoint using the given server and parameters. |
Méthode | Description | |
---|---|---|
GetEndpoint ( string $endpoint, array $params = null ) : string | Gets an endpoint using the given server and parameters. | |
GetExpiryTimestamp ( array $credentials ) : integer | boolean | Get the expiry of a given credential, or false if none is found. |
public CanRefreshAccessToken ( array $credentials ) : boolean | ||
$credentials | array | the credentials |
Résultat | boolean | true if the credentials can be refreshed |
public FormatCredentialsForHeader ( array $credentials ) : string | ||
$credentials | array | the OAuth2 credentials |
Résultat | string | the credentials formatted for use in an HTTP header |
public FormatCredentialsForUrl ( array $credentials ) : string | ||
$credentials | array | the OAuth2 credentials |
Résultat | string | the credentials formatted for use in a URL |
protected GetAccessEndpoint ( array $params = null ) : string | ||
$params | array | the parameters to include in the endpoint |
Résultat | string | the access endpoint |
abstract public GetAccessToken ( array $credentials, string $code, string $redirectUri = null ) : array | ||
$credentials | array | the credentials, including client_id and client_secret |
$code | string | the authorization code returned in the response |
$redirectUri | string | optional callback URL |
Résultat | array | the credentials passed in plus access_token, expires_in, timestamp and optionally refresh_token if offline mode was requested |
public GetAuthorizationUrl ( array $credentials, string $redirectUri = null, boolean $offline = null, array $params = null ) : string | ||
$credentials | array | the credentials, including client_id |
$redirectUri | string | optional callback URL |
$offline | boolean | whether or not to request offline access (aka a refresh token), false by default |
$params | array | optional array of additional parameters to include in the URL |
Résultat | string | an authorization URL to redirect the user to |
protected GetAuthorizeEndpoint ( array $params = null ) : string | ||
$params | array | the parameters to include in the endpoint |
Résultat | string | the authorization endpoint |
public GetOrRefreshAccessToken ( array $credentials ) : array | ||
$credentials | array | the credentials, including client_id and client_secret |
Résultat | array | the credentials passed in plus any refreshed credentials if they were refreshed |
public IsAccessTokenExpiring ( array $credentials ) : boolean | ||
$credentials | array | the credentials, including access_token, timestamp and expires_in |
Résultat | boolean | true if the token has expired |
public IsAccessTokenValid ( array $credentials ) : boolean | ||
$credentials | array | the credentials, including access_token, timestamp and expires_in |
Résultat | boolean | true if the access token is valid or if expiring information isn't available |
abstract public RefreshAccessToken ( array $credentials ) : array | ||
$credentials | array | the credentials, including the client_id, client_secret, refresh_token |
Résultat | array | the credentials |
public ShouldRefreshAccessToken ( array $credentials ) : boolean | ||
$credentials | array | the credentials, including client_id and client_secret |
Résultat | boolean | true if the Access Token should be refreshed |
public __construct ( array $scopes = null ) | ||
$scopes | array | optional, Google API scopes this handler should use |