Skip to content

Commit

Permalink
small oauth updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bessudnov committed Nov 24, 2020
1 parent defaa6c commit d08120f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/AmoCRM/OAuth/AmoCRMOAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,19 @@ public function setBaseDomain(string $domain): self
return $this;
}

/**
* Установка протокола
* @param string $protocol
*
* @return $this
*/
public function setProtocol(string $protocol): self
{
$this->oauthProvider->setProtocol($protocol);

return $this;
}

/**
* Получение авторизационных заголовков для переданного Access токена
* @param AccessTokenInterface $accessToken
Expand Down Expand Up @@ -346,7 +359,7 @@ public function getAccountDomain(AccessTokenInterface $accessToken): AccountDoma
AmoCRMApiRequest::GET_REQUEST,
sprintf(
'%s%s%s',
$this->oauthProvider->protocol,
$this->oauthProvider->getProtocol(),
$this->oauthProvider->getBaseDomain(),
'/oauth2/account/subdomain'
),
Expand Down

0 comments on commit d08120f

Please sign in to comment.