chore: updated bitbucket adapter

This commit is contained in:
Christy Jacob 2020-01-18 18:50:07 +05:30
parent 7bd3b7ab46
commit 1e4fe08901

View file

@ -49,15 +49,17 @@ class Bitbucket extends OAuth
{
// Required as per Bitbucket Spec.
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
$accessToken = $this->request(
'POST',
'https://bitbucket.org/site/oauth2/access_token',
$headers,
'code=' . urlencode($code) .
'&client_id=' . urlencode($this->appID) .
'&client_secret=' . urlencode($this->appSecret).
'&grant_type=authorization_code'
http_build_query([
'code' => $code,
'client_id' => $this->appID,
'client_secret' => $this->appSecret,
'grant_type' => 'authorization_code'
])
);
$accessToken = json_decode($accessToken, true);