Skip to content

Commit e2b7c83

Browse files
committed
Merge with master
2 parents 8e0a5fb + af24e8b commit e2b7c83

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

src/Factories/Entities/ClientEntityFactory.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use SimpleSAML\Module\oidc\Helpers;
1313
use SimpleSAML\Module\oidc\ModuleConfig;
1414
use SimpleSAML\Module\oidc\Server\Exceptions\OidcServerException;
15-
use SimpleSAML\Module\oidc\Utils\ClaimTranslatorExtractor;
1615
use SimpleSAML\OpenID\Codebooks\ApplicationTypesEnum;
1716
use SimpleSAML\OpenID\Codebooks\ClaimsEnum;
1817
use SimpleSAML\OpenID\Codebooks\GrantTypesEnum;
@@ -25,7 +24,6 @@ class ClientEntityFactory
2524
public function __construct(
2625
private readonly SspBridge $sspBridge,
2726
private readonly Helpers $helpers,
28-
private readonly ClaimTranslatorExtractor $claimTranslatorExtractor,
2927
private readonly ModuleConfig $moduleConfig,
3028
) {
3129
}
@@ -129,7 +127,7 @@ public function fromRegistrationData(
129127
// Filter to only allowed scopes
130128
$scopes = array_filter(
131129
$scopes,
132-
fn(string $scope): bool => $this->claimTranslatorExtractor->hasClaimSet($scope),
130+
fn(string $scope): bool => array_key_exists($scope, $this->moduleConfig->getScopes()),
133131
);
134132
// Let's ensure there is at least 'openid' scope present.
135133
$scopes = empty($scopes) ? [ScopesEnum::OpenId->value] : $scopes;

src/Services/Container.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ public function __construct()
259259
$clientEntityFactory = new ClientEntityFactory(
260260
$sspBridge,
261261
$helpers,
262-
$claimTranslatorExtractor,
263262
$moduleConfig,
264263
);
265264
$this->services[ClientEntityFactory::class] = $clientEntityFactory;

0 commit comments

Comments
 (0)