Skip to content

Commit

Permalink
Merge pull request #7 from GVSO/master
Browse files Browse the repository at this point in the history
Use space character as scope separator
  • Loading branch information
stevenmaguire authored May 3, 2018
2 parents ed90481 + 6c5037f commit 05b2da5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/Provider/Bitbucket.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
2 changes: 1 addition & 1 deletion test/src/Provider/BitbucketTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 05b2da5

Please sign in to comment.