From f0e472c34623f1e49d590d536d788275223b0637 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Getulio=20S=C3=A1nchez?= Date: Sat, 14 Apr 2018 19:39:36 -0400 Subject: [PATCH 1/2] Use space character as scope separator --- src/Provider/Bitbucket.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Provider/Bitbucket.php b/src/Provider/Bitbucket.php index 4c876de..c561cef 100644 --- a/src/Provider/Bitbucket.php +++ b/src/Provider/Bitbucket.php @@ -57,6 +57,17 @@ protected function getDefaultScopes() return []; } + /** + * Returns the string that should be used to separate scopes when building + * the URL for requesting an access token. + * + * @return string Scope separator, defaults to ' ' + */ + protected function getScopeSeparator() + { + return ' '; + } + /** * Check a provider response for errors. * From 6c5037f4728745b002108f4018e66f826f610614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Getulio=20S=C3=A1nchez?= Date: Wed, 2 May 2018 20:20:19 -0400 Subject: [PATCH 2/2] Use comma as separator in test --- test/src/Provider/BitbucketTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/src/Provider/BitbucketTest.php b/test/src/Provider/BitbucketTest.php index 2d9da98..de00130 100644 --- a/test/src/Provider/BitbucketTest.php +++ b/test/src/Provider/BitbucketTest.php @@ -42,7 +42,7 @@ public function testAuthorizationUrl() public function testScopes() { - $scopeSeparator = ','; + $scopeSeparator = ' '; $options = ['scope' => [uniqid(), uniqid()]]; $query = ['scope' => implode($scopeSeparator, $options['scope'])]; $url = $this->provider->getAuthorizationUrl($options);