Introduce an API endpoint to obtain public keys, that can be used to verify access tokens on other services

This commit is contained in:
ErickSkrauch
2024-06-14 04:36:49 +02:00
parent 17109f8eb5
commit 2111e1769f
3 changed files with 62 additions and 0 deletions

View File

@@ -108,6 +108,10 @@ class Component extends BaseComponent {
return $rawValue;
}
public function getPublicKey(): string {
return $this->getAlgorithmManager()->get(self::PREFERRED_ALGORITHM)->getPublicKey()->getContent();
}
private function getAlgorithmManager(): AlgorithmsManager {
if ($this->algorithmManager === null) {
$this->algorithmManager = new AlgorithmsManager([