Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
tokenclient.php
1
<?php
2
namespace
Bitrix\Sale\Exchange\Integration\Rest\Client
;
3
4
5
use
Bitrix\Sale\Exchange\Integration
;
6
7
class
TokenClient
extends
Base
8
{
10
protected
$token
;
11
12
public
function
__construct
(Integration\
Entity
\
Token
$token
)
13
{
14
parent::__construct([
15
"accessToken"
=>
$token
->getAccessToken(),
16
"refreshToken"
=>
$token
->getRefreshToken(),
17
"endPoint"
=>
$token
->getRestEndpoint(),
18
]);
19
20
$this->token =
$token
;
21
}
22
23
protected
function
refreshAccessToken
()
24
{
25
$success = $this->token->refresh(
new
Integration\OAuth\
Bitrix24
());
26
if
($success)
27
{
28
$this->setAccessToken($this->token->getAccessToken());
29
$this->setRefreshToken($this->token->getRefreshToken());
30
$this->setEndPoint($this->token->getRestEndpoint());
31
}
32
33
return
$success;
34
}
35
}
Bitrix\Catalog\Model\Entity
Definition
entity.php:12
Bitrix\Sale\Exchange\Integration\App\Base
Definition
base.php:8
Bitrix\Sale\Exchange\Integration\OAuth\Bitrix24
Definition
bitrix24.php:11
Bitrix\Sale\Exchange\Integration\Rest\Client\TokenClient
Definition
tokenclient.php:8
Bitrix\Sale\Exchange\Integration\Rest\Client\TokenClient\$token
$token
Definition
tokenclient.php:10
Bitrix\Sale\Exchange\Integration\Rest\Client\TokenClient\__construct
__construct(Integration\Entity\Token $token)
Definition
tokenclient.php:12
Bitrix\Sale\Exchange\Integration\Rest\Client\TokenClient\refreshAccessToken
refreshAccessToken()
Definition
tokenclient.php:23
Bitrix\Sale\Exchange\Integration\Token
Definition
token.php:11
Bitrix\Sale\Exchange\Integration\Rest\Client
Definition
base.php:2
Bitrix\Sale\Exchange\Integration
modules
sale
lib
exchange
integration
rest
client
tokenclient.php
Создано системой
1.10.0