Property | Type | Description | |
---|---|---|---|
$access_token | current OAuth2 access token. | ||
$client_id | OAuth2 client id. | ||
$client_secret | OAuth2 client secret key. | ||
$errorAccessDeniedCode | Error code for access_denied response. | ||
$errorDescriptionParam | Error description key name in _GET options. | ||
$errorParam | Error key name in _GET options. | ||
$providerOptions | Provider options. Must contain the keys: authorize, access_token. | ||
$scope | OAuth scopes. |
Method | Description | |
---|---|---|
authenticate ( ) : boolean | Authenticate the user. | |
init ( $component, $options = [] ) | ||
makeSignedRequest ( string $url, array $options = [], boolean $parseJson = true ) : stdClass | Returns the protected resource. |
Method | Description | |
---|---|---|
getAccessToken ( string $code ) : string | Returns the OAuth2 access token. | |
getCodeUrl ( string $redirect_uri ) : string | Returns the url to request to get OAuth2 code. | |
getSignedRequestFields ( ) : array | Returns fields required for signed request. | |
getTokenUrl ( string $code ) : string | Returns the url to request to get OAuth2 access token. | |
restoreAccessToken ( ) : boolean | Restore access token from the session. | |
saveAccessToken ( string $token ) | Save access token to the session. |
public authenticate ( ) : boolean | ||
return | boolean | whether user was successfuly authenticated. |
protected getAccessToken ( string $code ) : string | ||
$code | string | the OAuth2 code. See {@link getCodeUrl}. |
return | string | the token. |
protected getCodeUrl ( string $redirect_uri ) : string | ||
$redirect_uri | string | url to redirect after user confirmation. |
return | string | url to request. |
protected getSignedRequestFields ( ) : array | ||
return | array |
protected getTokenUrl ( string $code ) : string | ||
$code | string | |
return | string | url to request. |
protected restoreAccessToken ( ) : boolean | ||
return | boolean | whether the access token was successfuly restored. |
protected saveAccessToken ( string $token ) | ||
$token | string | access token. |
protected $errorAccessDeniedCode |
protected $errorDescriptionParam |
protected $providerOptions |