File manager - Edit - /home/aresglob/public_html/wp/wp-includes/images/smilies/Provider.tar
Back
OpenID.php 0000644 00000002067 15104575310 0006401 0 ustar 00 <?php /*! * Hybridauth * https://hybridauth.github.io | https://github.com/hybridauth/hybridauth * (c) 2017 Hybridauth authors | https://hybridauth.github.io/license.html */ namespace Hybridauth\Provider; use Hybridauth\Adapter; /** * Generic OpenID providers adapter. * * Example: * * $config = [ * 'callback' => Hybridauth\HttpClient\Util::getCurrentUrl(), * * // authenticate with Yahoo openid * 'openid_identifier' => 'https://open.login.yahooapis.com/openid20/www.yahoo.com/xrds' * * // authenticate with stackexchange network openid * // 'openid_identifier' => 'https://openid.stackexchange.com/', * * // authenticate with Steam openid * // 'openid_identifier' => 'http://steamcommunity.com/openid', * * // etc. * ]; * * $adapter = new Hybridauth\Provider\OpenID($config); * * try { * $adapter->authenticate(); * * $userProfile = $adapter->getUserProfile(); * } catch (\Exception $e) { * echo $e->getMessage() ; * } */ class OpenID extends Adapter\OpenID { } LinkedInOpenID.php 0000644 00000004175 15104575310 0010021 0 ustar 00 <?php /*! * Hybridauth * https://hybridauth.github.io | https://github.com/hybridauth/hybridauth * (c) 2017 Hybridauth authors | https://hybridauth.github.io/license.html */ namespace Hybridauth\Provider; use Hybridauth\Adapter\OAuth2; use Hybridauth\Data; use Hybridauth\Exception\UnexpectedApiResponseException; use Hybridauth\User; /** * LinkedIn OAuth2 provider adapter. */ class LinkedInOpenID extends OAuth2 { /** * {@inheritdoc} */ protected $scope = 'openid profile email'; /** * {@inheritdoc} */ protected $apiBaseUrl = 'https://api.linkedin.com/v2/'; /** * {@inheritdoc} */ protected $authorizeUrl = 'https://www.linkedin.com/oauth/v2/authorization'; /** * {@inheritdoc} */ protected $accessTokenUrl = 'https://www.linkedin.com/oauth/v2/accessToken'; /** * {@inheritdoc} */ protected $apiDocumentation = 'https://docs.microsoft.com/en-us/linkedin/shared/authentication/authentication'; /** * {@inheritdoc} */ protected function initialize() { parent::initialize(); if ($this->isRefreshTokenAvailable()) { $this->tokenRefreshParameters += [ 'client_id' => $this->clientId, 'client_secret' => $this->clientSecret ]; } } /** * {@inheritdoc} */ public function getUserProfile() { $response = $this->apiRequest('/userinfo', 'GET', []); $data = new Data\Collection($response); if (!$data->exists('sub')) { throw new UnexpectedApiResponseException('Provider API returned an unexpected response.'); } $userProfile = new User\Profile(); $userProfile->firstName = $data->get('given_name'); $userProfile->lastName = $data->get('family_name'); $userProfile->identifier = $data->get('sub'); $userProfile->email = $data->get('email'); $userProfile->emailVerified = $data->get('email_verified'); $userProfile->displayName = $data->get('name'); $userProfile->photoURL = $data->get('picture'); return $userProfile; } } Google.php 0000644 00000013247 15112623340 0006475 0 ustar 00 <?php /*! * Hybridauth * https://hybridauth.github.io | https://github.com/hybridauth/hybridauth * (c) 2017 Hybridauth authors | https://hybridauth.github.io/license.html */ namespace Hybridauth\Provider; use Hybridauth\Adapter\OAuth2; use Hybridauth\Exception\UnexpectedApiResponseException; use Hybridauth\Data; use Hybridauth\User; /** * Google OAuth2 provider adapter. * * Example: * * $config = [ * 'callback' => Hybridauth\HttpClient\Util::getCurrentUrl(), * 'keys' => ['id' => '', 'secret' => ''], * 'scope' => 'https://www.googleapis.com/auth/userinfo.profile', * * // google's custom auth url params * 'authorize_url_parameters' => [ * 'approval_prompt' => 'force', // to pass only when you need to acquire a new refresh token. * 'access_type' => .., // is set to 'offline' by default * 'hd' => .., * 'state' => .., * // etc. * ] * ]; * * $adapter = new Hybridauth\Provider\Google($config); * * try { * $adapter->authenticate(); * * $userProfile = $adapter->getUserProfile(); * $tokens = $adapter->getAccessToken(); * $contacts = $adapter->getUserContacts(['max-results' => 75]); * } catch (\Exception $e) { * echo $e->getMessage() ; * } */ class Google extends OAuth2 { /** * {@inheritdoc} */ // phpcs:ignore protected $scope = 'https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email'; /** * {@inheritdoc} */ protected $apiBaseUrl = 'https://www.googleapis.com/'; /** * {@inheritdoc} */ protected $authorizeUrl = 'https://accounts.google.com/o/oauth2/v2/auth'; /** * {@inheritdoc} */ protected $accessTokenUrl = 'https://oauth2.googleapis.com/token'; /** * {@inheritdoc} */ protected $apiDocumentation = 'https://developers.google.com/identity/protocols/OAuth2'; /** * {@inheritdoc} */ protected function initialize() { parent::initialize(); $this->AuthorizeUrlParameters += [ 'access_type' => 'offline' ]; if ($this->isRefreshTokenAvailable()) { $this->tokenRefreshParameters += [ 'client_id' => $this->clientId, 'client_secret' => $this->clientSecret ]; } } /** * {@inheritdoc} * * See: https://developers.google.com/identity/protocols/OpenIDConnect#obtainuserinfo
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings