Skip to content

Commit

Permalink
internal features
Browse files Browse the repository at this point in the history
  • Loading branch information
bessudnov committed Nov 24, 2020
1 parent d08120f commit 6c81682
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions src/AmoCRM/OAuth/AmoCRMOAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ class AmoCRMOAuth
* AmoCRMOAuth constructor.
* @param string $clientId
* @param string $clientSecret
* @param string $redirectUri
* @param null|string $redirectUri
*/
public function __construct(string $clientId, string $clientSecret, string $redirectUri)
public function __construct(string $clientId, string $clientSecret, ?string $redirectUri)
{
$this->oauthProvider = new AmoCRM(
[
Expand Down Expand Up @@ -193,6 +193,30 @@ public function setProtocol(string $protocol): self
return $this;
}

/**
* Установка адреса перенаправления
*
* @param string|null $redirectUri
*
* @return $this
*/
public function setRedirectUri(?string $redirectUri): self
{
$this->oauthProvider->setRedirectUri($redirectUri);

return $this;
}

/**
* Получаем oAuth провайдера
*
* @return AmoCRM
*/
public function getOAuthProvider(): AmoCRM
{
return $this->oauthProvider;
}

/**
* Получение авторизационных заголовков для переданного Access токена
* @param AccessTokenInterface $accessToken
Expand Down

0 comments on commit 6c81682

Please sign in to comment.