Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3 from sdaoudi/sdaoudi-patch-1
Browse files Browse the repository at this point in the history
Update keycloak scope separator
  • Loading branch information
sdaoudi authored Jun 7, 2021
2 parents 38ceb04 + 4c46027 commit 7dd35ad
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions src/Provider/Keycloak.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,20 @@ protected function getBaseUrlWithRealm()
*/
protected function getDefaultScopes()
{
return ['name', 'email'];
return ['profile', 'email'];
}


/**
* 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/KeycloakTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function testEncryptionKeyPathFails()

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 7dd35ad

Please sign in to comment.