Skip to content

Commit d406bca

Browse files
Update tests/HttpClient/Plugin/TrustedPublishingTokenExchangeTest.php
Co-authored-by: Steven Rombauts <steven@kotuha.be>
1 parent 22bd57b commit d406bca

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/HttpClient/Plugin/TrustedPublishingTokenExchangeTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ public function testTokenExchange(): void
5757
$this->assertCount(2, $requests);
5858
$this->assertSame('/oidc/audience', (string) $requests[0]->getUri());
5959
$this->assertSame('/oidc/token-exchange/organization/acme/package', (string) $requests[1]->getUri());
60+
61+
// Verify that the signature is configured using the correct key
62+
$this->builder->getHttpClient()->get('/api/foo');
63+
$this->assertStringContainsString('PACKAGIST-HMAC-SHA256 Key=key', $requests[2]->getHeader('Authorization')[0]);
6064
}
6165

6266
public function testNoTokenGenerated(): void

0 commit comments

Comments
 (0)