%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 49.231.201.246 / Your IP : 216.73.216.149 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/11585/task/11585/cwd/html/water/vendor/yiisoft/yii2-authclient/src/clients/ |
Upload File : |
<?php /** * @link http://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license http://www.yiiframework.com/license/ */ namespace yii\authclient\clients; use yii\authclient\OAuth2; /** * TwitterOAuth2 allows authentication via Twitter OAuth 2. * * Note, that at the time these docs are written, Twitter does not provide full support for OAuth 2 protocol. * It is supported only for [application-only authentication](https://dev.twitter.com/oauth/application-only) workflow. * Thus only [[authenticateClient()]] method of this class has a practical usage. * * Any authentication attempt on behalf of the end-user will fail for this client. You should use [[Twitter]] class for * this workflow. * * @see Twitter * @see https://dev.twitter.com/ * * @author Paul Klimov <klimov.paul@gmail.com> * @since 2.1.4 */ class TwitterOAuth2 extends OAuth2 { /** * {@inheritdoc} */ public $authUrl = 'https://api.twitter.com/oauth2/authenticate'; /** * {@inheritdoc} */ public $tokenUrl = 'https://api.twitter.com/oauth2/token'; /** * {@inheritdoc} */ public $apiBaseUrl = 'https://api.twitter.com/1.1'; /** * {@inheritdoc} */ protected function initUserAttributes() { return $this->api('account/verify_credentials.json', 'GET'); } /** * {@inheritdoc} */ protected function defaultName() { return 'twitter'; } /** * {@inheritdoc} */ protected function defaultTitle() { return 'Twitter'; } /** * {@inheritdoc} */ public function applyAccessTokenToRequest($request, $accessToken) { $request->getHeaders()->set('Authorization', 'Bearer '. $accessToken->getToken()); } }