Make API URL available for external use.
parent
5a3d60c0cf
commit
0e500d4c91
|
@ -28,6 +28,8 @@ class Bitbucket
|
||||||
private $remoteFilesystem;
|
private $remoteFilesystem;
|
||||||
private $token = array();
|
private $token = array();
|
||||||
|
|
||||||
|
const OAUTH2_ACCESS_TOKEN_URL = 'https://bitbucket.org/site/oauth2/access_token';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
|
@ -81,9 +83,7 @@ class Bitbucket
|
||||||
private function requestAccessToken($originUrl)
|
private function requestAccessToken($originUrl)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$apiUrl = 'https://bitbucket.org/site/oauth2/access_token';
|
$json = $this->remoteFilesystem->getContents($originUrl, self::OAUTH2_ACCESS_TOKEN_URL, false, array(
|
||||||
|
|
||||||
$json = $this->remoteFilesystem->getContents($originUrl, $apiUrl, false, array(
|
|
||||||
'retry-auth-failure' => false,
|
'retry-auth-failure' => false,
|
||||||
'http' => array(
|
'http' => array(
|
||||||
'method' => 'POST',
|
'method' => 'POST',
|
||||||
|
|
Loading…
Reference in New Issue