Skip to content

Commit b64e3f9

Browse files
committed
Enable getting all public keys
1 parent 8c69822 commit b64e3f9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/ValueAbstracts/SignatureKeyPairBag.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use SimpleSAML\OpenID\Algorithms\SignatureAlgorithmEnum;
88
use SimpleSAML\OpenID\Exceptions\OpenIdException;
9+
use SimpleSAML\OpenID\Jwk\JwkDecorator;
910

1011
class SignatureKeyPairBag
1112
{
@@ -108,4 +109,18 @@ public function getAllAlgorithmNamesUnique(): array
108109
),
109110
);
110111
}
112+
113+
114+
/**
115+
* @return \SimpleSAML\OpenID\Jwk\JwkDecorator[]
116+
*/
117+
public function getAllPublicKeys(): array
118+
{
119+
return array_values(
120+
array_map(
121+
fn(SignatureKeyPair $signatureKeyPair): JwkDecorator => $signatureKeyPair->getKeyPair()->getPublicKey(),
122+
$this->getAll(),
123+
),
124+
);
125+
}
111126
}

0 commit comments

Comments
 (0)