Skip to content

Commit 3c8a9fa

Browse files
committed
use key interface for testing
1 parent 7c2af42 commit 3c8a9fa

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/Utils/Jwks.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
namespace Pdsinterop\Solid\Auth\Utils;
44

55
use JsonSerializable;
6-
use Lcobucci\JWT\Signer\Key\InMemory;
6+
use Lcobucci\JWT\Signer\Key as Key;
77
use Pdsinterop\Solid\Auth\Enum\Jwk\Parameter as JwkParameter;
88
use Pdsinterop\Solid\Auth\Enum\Rsa\Parameter as RsaParameter;
99

1010
class Jwks implements JsonSerializable
1111
{
1212
////////////////////////////// CLASS PROPERTIES \\\\\\\\\\\\\\\\\\\\\\\\\\\\
1313

14-
/** @var InMemory */
14+
/** @var Key */
1515
private $publicKey;
1616

1717
//////////////////////////////// PUBLIC API \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
1818

19-
final public function __construct(InMemory $publicKey)
19+
final public function __construct(Key $publicKey)
2020
{
2121
$this->publicKey = $publicKey;
2222
}
@@ -64,9 +64,8 @@ private function create() : array
6464

6565
$publicKeys = [$this->publicKey];
6666

67-
array_walk($publicKeys, function (InMemory $publicKey) use (&$jwks) {
67+
array_walk($publicKeys, function (Key $publicKey) use (&$jwks) {
6868
$certificate = $publicKey->contents();
69-
7069
$key = openssl_pkey_get_public($certificate);
7170
$keyInfo = openssl_pkey_get_details($key);
7271

0 commit comments

Comments
 (0)