Skip to content

Commit

Permalink
Merge pull request #29 from jeremy379/revert-27-dev/get-claims-with-s…
Browse files Browse the repository at this point in the history
…copes

Revert "Add scope filter to getClaims()"
  • Loading branch information
jeremy379 authored Sep 19, 2024
2 parents 4a22ec9 + 9e7f37f commit edd7d40
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
4 changes: 1 addition & 3 deletions src/Claims/Claimable.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
interface Claimable
{
/**
* @param string[] $scopes Optional scope filter
*
* @return string[]
*/
public function getClaims(array $scopes = []): array;
public function getClaims(): array;
}
4 changes: 1 addition & 3 deletions src/Claims/Traits/WithClaims.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ trait WithClaims
protected array $claims;

/**
* @param string[] $scopes Optional scope filter
*
* @return string[]
*/
public function getClaims(array $scopes = []): array
public function getClaims(): array
{
return $this->claims;
}
Expand Down
4 changes: 1 addition & 3 deletions src/Entities/IdentityEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ class IdentityEntity implements IdentityEntityInterface
use WithClaims;

/**
* @param string[] $scopes Optional scope filter
*
* @return string[]
*/
public function getClaims(array $scopes = []): array
public function getClaims(): array
{
/**
* For a complete list of default claim sets
Expand Down
2 changes: 1 addition & 1 deletion src/IdTokenResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ protected function getExtraParams(AccessTokenEntityInterface $accessToken): arra

$claims = $this->claimExtractor->extract(
$scopes,
$user->getClaims(explode(' ', $params['scope'])),
$user->getClaims(),
);

foreach ($claims as $claimName => $claimValue) {
Expand Down

0 comments on commit edd7d40

Please sign in to comment.