Skip to content

Commit 2271e27

Browse files
committed
Ensure kid header in TrustMarkStatus
1 parent 0e98f86 commit 2271e27

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/Federation/TrustMarkStatus.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,17 @@ public function getType(): string
8585
}
8686

8787

88+
/**
89+
* @throws \SimpleSAML\OpenID\Exceptions\TrustMarkStatusException
90+
* @throws \SimpleSAML\OpenID\Exceptions\JwsException
91+
* @return non-empty-string
92+
*/
93+
public function getKeyId(): string
94+
{
95+
return parent::getKeyId() ?? throw new TrustMarkStatusException('No KeyId header claim found.');
96+
}
97+
98+
8899
/**
89100
* @throws \SimpleSAML\OpenID\Exceptions\JwsException
90101
* @throws \SimpleSAML\OpenID\Exceptions\TrustMarkException
@@ -97,6 +108,7 @@ protected function validate(): void
97108
$this->getTrustMark(...),
98109
$this->getStatus(...),
99110
$this->getType(...),
111+
$this->getKeyId(...),
100112
);
101113
}
102114
}

0 commit comments

Comments
 (0)