File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 33namespace Pdsinterop \Solid \Auth \Config ;
44
55use Defuse \Crypto \Key as CryptoKey ;
6- use Lcobucci \JWT \Signer \Key \ InMemory as Key ;
6+ use Lcobucci \JWT \Signer \Key as Key ;
77use League \OAuth2 \Server \CryptKey ;
88
99interface KeysInterface
Original file line number Diff line number Diff line change @@ -305,6 +305,22 @@ final public function testIdTokenGenerationWithoutDpopKey(): void
305305 ->willReturn ('mock issuer ' )
306306 ;
307307
308+ $ publicKey = file_get_contents (__DIR__ .'/../fixtures/keys/public.key ' );
309+
310+ $ mockPublicKey = $ this ->getMockBuilder (\Lcobucci \JWT \Signer \Key::class)
311+ ->getMock ()
312+ ;
313+
314+ $ mockPublicKey ->expects ($ this ->once ())
315+ ->method ('contents ' )
316+ ->willReturn ($ publicKey )
317+ ;
318+
319+ $ this ->mockKeys ->expects ($ this ->once ())
320+ ->method ('getPublicKey ' )
321+ ->willReturn ($ this ->mockPublicKey )
322+ ;
323+
308324 $ privateKey = file_get_contents (__DIR__ .'/../fixtures/keys/private.key ' );
309325
310326 $ now = new \DateTimeImmutable ('1234-01-01 12:34:56.789 ' );
@@ -323,6 +339,7 @@ final public function testIdTokenGenerationWithoutDpopKey(): void
323339 [
324340 'typ ' => 'JWT ' ,
325341 'alg ' => 'RS256 ' ,
342+ 'kid ' => '0c3932ca20f3a00ad2eb72035f6cc9cb '
326343 ],
327344 [
328345 'at_hash ' => '1EZBnvsFWlK8ESkgHQsrIQ ' ,
You can’t perform that action at this time.
0 commit comments