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/cvetdv.ru/bitrix/modules/yandex.market/lib/trading/facade/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/cvetdv.ru/bitrix/modules/yandex.market/lib/trading/facade/oauth.php
<?php
namespace Yandex\Market\Trading\Facade;

use Yandex\Market;
use Bitrix\Main;

class Oauth
{
    /** @deprecated */
	public static function getConfiguration(Market\Api\OAuth2\Token\Model $token)
	{
		$setup = static::getSetup($token);

		if ($setup === null) { return null; }

		$options = $setup->wakeupService()->getOptions();

		Market\Reference\Assert::typeOf(
			$options,
			Market\Api\Reference\HasOauthConfiguration::class,
			'$setup->getService()->getOptions()'
		);

		return $options;
	}

    /** @deprecated */
    public static function getSetup(Market\Api\OAuth2\Token\Model $token)
	{
		$result = null;

		$setupList = Market\Trading\Setup\Model::loadList([
			'filter' => [
				'=OAUTH_CLIENT_ID.VALUE' => $token->getClientId(),
				'=OAUTH_TOKEN.VALUE' => $token->getId(),
				'API_KEY.VALUE' => false,
			],
			'runtime' => [
				new Main\Entity\ReferenceField('OAUTH_CLIENT_ID', Market\Trading\Settings\Table::class, [
					'=this.ID' => 'ref.SETUP_ID',
					'=ref.NAME' => [ '?', 'OAUTH_CLIENT_ID' ],
				]),
				new Main\Entity\ReferenceField('OAUTH_TOKEN', Market\Trading\Settings\Table::class, [
					'=this.ID' => 'ref.SETUP_ID',
					'=ref.NAME' => [ '?', 'OAUTH_TOKEN' ],
				]),
				new Main\Entity\ReferenceField('API_KEY', Market\Trading\Settings\Table::class, [
					'=this.ID' => 'ref.SETUP_ID',
					'=ref.NAME' => [ '?', 'API_KEY' ],
				]),
			],
			'order' => [ 'ACTIVE' => 'desc' ],
		]);

		foreach ($setupList as $setup)
		{
			$options = $setup->getService()->getOptions();

			if (!($options instanceof Market\Api\Reference\HasOauthConfiguration)) { continue; }

			$result = $setup;
			break;
		}

		return $result;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit