Skip to content

Commit 02f9ad9

Browse files
committed
Fetch supported response modes from ModuleConfig
1 parent 69705e8 commit 02f9ad9

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

src/Services/OpMetadataService.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
use SimpleSAML\Module\oidc\Utils\ClaimTranslatorExtractor;
1010
use SimpleSAML\OpenID\Codebooks\ClaimsEnum;
1111
use SimpleSAML\OpenID\Codebooks\GrantTypesEnum;
12-
use SimpleSAML\OpenID\Codebooks\ResponseModesEnum;
1312
use SimpleSAML\OpenID\Codebooks\TokenEndpointAuthMethodsEnum;
1413

1514
/**
@@ -101,11 +100,7 @@ private function initMetadata(): void
101100
$this->metadata[ClaimsEnum::ClaimsSupported->value] = $claimsSupported;
102101
}
103102

104-
$this->metadata[ClaimsEnum::ResponseModesSupported->value] = [
105-
ResponseModesEnum::Query->value,
106-
ResponseModesEnum::Fragment->value,
107-
ResponseModesEnum::FormPost->value,
108-
];
103+
$this->metadata[ClaimsEnum::ResponseModesSupported->value] = $this->moduleConfig->getSupportedResponseModes();
109104

110105
// https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html#name-oauth-20-authorization-serv
111106
// OPTIONAL

tests/unit/src/Services/OpMetadataServiceTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public function setUp(): void
5353
return $paths[$path] ?? null;
5454
});
5555
$this->moduleConfigMock->method('getAcrValuesSupported')->willReturn(['1']);
56+
$this->moduleConfigMock->method('getSupportedResponseModes')->willReturn(['query', 'fragment', 'form_post']);
5657

5758
$this->claimTranslatorExtractorMock = $this->createMock(ClaimTranslatorExtractor::class);
5859

0 commit comments

Comments
 (0)