Skip to content

Commit

Permalink
Set SSP requirement to 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
cicnavi committed Dec 2, 2023
1 parent 356f7ea commit 736a2c5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"friendsofphp/php-cs-fixer": "^3",
"phpunit/phpunit": "^10",
"rector/rector": "^0.18.3",
"simplesamlphp/simplesamlphp": "dev-simplesamlphp-2.1",
"simplesamlphp/simplesamlphp": "2.1.*",
"simplesamlphp/simplesamlphp-test-framework": "^1.5",
"squizlabs/php_codesniffer": "^3",
"vimeo/psalm": "^5"
Expand Down
14 changes: 9 additions & 5 deletions src/Services/AuthenticationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,17 @@ private function prepareStateArray(
'OpenIdProviderMetadata' => $this->opMetadataService->getMetadata(),
'RelyingPartyMetadata' => array_filter(
$client->toArray(),
fn(string $key) => $key !== 'secret',
fn(/** @param array-key $key */ $key) => $key !== 'secret',
ARRAY_FILTER_USE_KEY
),
'AuthorizationRequestParameters' => array_filter(
$request->getQueryParams(),
function (/** @param array-key $key */ $key) {
$authzParams = ['response_type', 'client_id', 'redirect_uri', 'scope', 'code_challenge_method'];
return in_array($key, $authzParams);
},
ARRAY_FILTER_USE_KEY
),
'AuthorizationRequestParameters' => array_filter($request->getQueryParams(), function (string $key) {
$relevantAuthzParams = ['response_type', 'client_id', 'redirect_uri', 'scope', 'code_challenge_method'];
return in_array($key, $relevantAuthzParams);
}, ARRAY_FILTER_USE_KEY),
];

// Source and destination entity IDs, useful for e.g. F-ticks logging...
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/ClaimTranslatorExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ private function extractAdditionalClaims(array $requestedClaims, array $claims):

return array_filter(
$translatedClaims,
fn(string $key) => array_key_exists($key, $requestedClaims),
fn(/** @param array-key $key */ $key) => array_key_exists($key, $requestedClaims),
ARRAY_FILTER_USE_KEY
);
}
Expand Down

0 comments on commit 736a2c5

Please sign in to comment.