From 9e7f37ffbf60deb013b4cd10cb2cd560757c3ae1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dillenbourg=20J=C3=A9r=C3=A9my?= Date: Thu, 19 Sep 2024 08:38:47 +0200 Subject: [PATCH] Revert "Add scope filter to getClaims()" --- src/Claims/Claimable.php | 4 +--- src/Claims/Traits/WithClaims.php | 4 +--- src/Entities/IdentityEntity.php | 4 +--- src/IdTokenResponse.php | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/Claims/Claimable.php b/src/Claims/Claimable.php index fc386d3..e99632f 100644 --- a/src/Claims/Claimable.php +++ b/src/Claims/Claimable.php @@ -5,9 +5,7 @@ interface Claimable { /** - * @param string[] $scopes Optional scope filter - * * @return string[] */ - public function getClaims(array $scopes = []): array; + public function getClaims(): array; } diff --git a/src/Claims/Traits/WithClaims.php b/src/Claims/Traits/WithClaims.php index c9394c4..c539ed8 100644 --- a/src/Claims/Traits/WithClaims.php +++ b/src/Claims/Traits/WithClaims.php @@ -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; } diff --git a/src/Entities/IdentityEntity.php b/src/Entities/IdentityEntity.php index 045d435..6e7fb9e 100644 --- a/src/Entities/IdentityEntity.php +++ b/src/Entities/IdentityEntity.php @@ -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 diff --git a/src/IdTokenResponse.php b/src/IdTokenResponse.php index 4e10186..be61c98 100644 --- a/src/IdTokenResponse.php +++ b/src/IdTokenResponse.php @@ -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) {