Свойство | Тип | Описание | |
---|---|---|---|
$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. |
Метод | Описание | |
---|---|---|
authenticate ( ) : boolean | Authenticate the user. | |
init ( $component, $options = [] ) | ||
makeSignedRequest ( string $url, array $options = [], boolean $parseJson = true ) : stdClass | Returns the protected resource. |
Метод | Описание | |
---|---|---|
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 | ||
Результат | boolean | whether user was successfuly authenticated. |
protected getAccessToken ( string $code ) : string | ||
$code | string | the OAuth2 code. See {@link getCodeUrl}. |
Результат | string | the token. |
protected getCodeUrl ( string $redirect_uri ) : string | ||
$redirect_uri | string | url to redirect after user confirmation. |
Результат | string | url to request. |
protected getSignedRequestFields ( ) : array | ||
Результат | array |
protected getTokenUrl ( string $code ) : string | ||
$code | string | |
Результат | string | url to request. |
protected restoreAccessToken ( ) : boolean | ||
Результат | boolean | whether the access token was successfuly restored. |
protected saveAccessToken ( string $token ) | ||
$token | string | access token. |
protected $errorAccessDeniedCode |
protected $errorDescriptionParam |
protected $providerOptions |