1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
tokenclient.php
См. документацию.
1<?php
2namespace Bitrix\Sale\Exchange\Integration\Rest\Client;
3
4
5use Bitrix\Sale\Exchange\Integration;
6
7class TokenClient extends Base
8{
10 protected $token;
11
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}
__construct(Integration\Entity\Token $token)
Определения tokenclient.php:12
$success
Определения mail_entry.php:69