From 0e500d4c9169e5856a42b831b43668f7b032b767 Mon Sep 17 00:00:00 2001 From: Stefan Grootscholten Date: Mon, 16 May 2016 21:42:11 +0200 Subject: [PATCH] Make API URL available for external use. --- src/Composer/Util/Bitbucket.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Composer/Util/Bitbucket.php b/src/Composer/Util/Bitbucket.php index 89fdd3902..279ba83fc 100644 --- a/src/Composer/Util/Bitbucket.php +++ b/src/Composer/Util/Bitbucket.php @@ -28,6 +28,8 @@ class Bitbucket private $remoteFilesystem; private $token = array(); + const OAUTH2_ACCESS_TOKEN_URL = 'https://bitbucket.org/site/oauth2/access_token'; + /** * Constructor. * @@ -81,9 +83,7 @@ class Bitbucket private function requestAccessToken($originUrl) { try { - $apiUrl = 'https://bitbucket.org/site/oauth2/access_token'; - - $json = $this->remoteFilesystem->getContents($originUrl, $apiUrl, false, array( + $json = $this->remoteFilesystem->getContents($originUrl, self::OAUTH2_ACCESS_TOKEN_URL, false, array( 'retry-auth-failure' => false, 'http' => array( 'method' => 'POST',