1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
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\Sale\Exchange\Integration\App\Base
Определения
base.php:8
Bitrix\Sale\Exchange\Integration\OAuth\Bitrix24
Определения
bitrix24.php:11
Bitrix\Sale\Exchange\Integration\Rest\Client\TokenClient
Определения
tokenclient.php:8
Bitrix\Sale\Exchange\Integration\Rest\Client\TokenClient\$token
$token
Определения
tokenclient.php:10
Bitrix\Sale\Exchange\Integration\Rest\Client\TokenClient\__construct
__construct(Integration\Entity\Token $token)
Определения
tokenclient.php:12
Bitrix\Sale\Exchange\Integration\Rest\Client\TokenClient\refreshAccessToken
refreshAccessToken()
Определения
tokenclient.php:23
Bitrix\Sale\Exchange\Integration\Token
Определения
token.php:11
$success
$success
Определения
mail_entry.php:69
Bitrix\Catalog\Integration
Bitrix\Sale\Exchange\Integration\Entity
Определения
accesscode.php:4
Bitrix\Sale\Exchange\Integration\OAuth
Определения
bitrix24.php:4
bitrix
modules
sale
lib
exchange
integration
rest
client
tokenclient.php
Создано системой
1.14.0