File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212use SimpleSAML \Module \oidc \Helpers ;
1313use SimpleSAML \Module \oidc \ModuleConfig ;
1414use SimpleSAML \Module \oidc \Server \Exceptions \OidcServerException ;
15- use SimpleSAML \Module \oidc \Utils \ClaimTranslatorExtractor ;
1615use SimpleSAML \OpenID \Codebooks \ApplicationTypesEnum ;
1716use SimpleSAML \OpenID \Codebooks \ClaimsEnum ;
1817use 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 ;
Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments