1717class EntityStatement extends ParsedJws
1818{
1919 /**
20- * @throws \SimpleSAML\OpenID\Exceptions\EntityStatementException
21- * @throws \SimpleSAML\OpenID\Exceptions\JwsException
2220 * @return non-empty-string
21+ * @throws \SimpleSAML\OpenID\Exceptions\JwsException
22+ * @throws \SimpleSAML\OpenID\Exceptions\EntityStatementException
2323 */
2424 public function getIssuer (): string
2525 {
@@ -28,9 +28,9 @@ public function getIssuer(): string
2828
2929
3030 /**
31- * @throws \SimpleSAML\OpenID\Exceptions\EntityStatementException
32- * @throws \SimpleSAML\OpenID\Exceptions\JwsException
3331 * @return non-empty-string
32+ * @throws \SimpleSAML\OpenID\Exceptions\JwsException
33+ * @throws \SimpleSAML\OpenID\Exceptions\EntityStatementException
3434 */
3535 public function getSubject (): string
3636 {
@@ -76,9 +76,9 @@ public function getJwks(): JwksClaim
7676
7777
7878 /**
79- * @throws \SimpleSAML\OpenID\Exceptions\EntityStatementException
80- * @throws \SimpleSAML\OpenID\Exceptions\JwsException
8179 * @return non-empty-string
80+ * @throws \SimpleSAML\OpenID\Exceptions\JwsException
81+ * @throws \SimpleSAML\OpenID\Exceptions\EntityStatementException
8282 */
8383 public function getType (): string
8484 {
@@ -93,9 +93,9 @@ public function getType(): string
9393
9494
9595 /**
96- * @throws \SimpleSAML\OpenID\Exceptions\EntityStatementException
97- * @throws \SimpleSAML\OpenID\Exceptions\JwsException
9896 * @return null|non-empty-string[]
97+ * @throws \SimpleSAML\OpenID\Exceptions\JwsException
98+ * @throws \SimpleSAML\OpenID\Exceptions\EntityStatementException
9999 */
100100 public function getAuthorityHints (): ?array
101101 {
@@ -128,9 +128,9 @@ public function getAuthorityHints(): ?array
128128
129129
130130 /**
131- * @throws \SimpleSAML\OpenID\Exceptions\EntityStatementException
132- * @throws \SimpleSAML\OpenID\Exceptions\JwsException
133131 * @return null|non-empty-string[]
132+ * @throws \SimpleSAML\OpenID\Exceptions\JwsException
133+ * @throws \SimpleSAML\OpenID\Exceptions\EntityStatementException
134134 */
135135 public function getTrustAnchorHints (): ?array
136136 {
@@ -304,9 +304,9 @@ public function getTrustMarkIssuers(): ?TrustMarkIssuersClaimBag
304304
305305
306306 /**
307- * @throws \SimpleSAML\OpenID\Exceptions\EntityStatementException
308- * @throws \SimpleSAML\OpenID\Exceptions\JwsException
309307 * @return non-empty-string
308+ * @throws \SimpleSAML\OpenID\Exceptions\JwsException
309+ * @throws \SimpleSAML\OpenID\Exceptions\EntityStatementException
310310 */
311311 public function getKeyId (): string
312312 {
@@ -315,11 +315,11 @@ public function getKeyId(): string
315315
316316
317317 /**
318- * @throws \SimpleSAML\OpenID\Exceptions\JwsException
318+ * @return ?non-empty-string
319319 * @throws \SimpleSAML\OpenID\Exceptions\InvalidValueException
320320 * @throws \SimpleSAML\OpenID\Exceptions\OpenIdException
321321 *
322- * @return ?non-empty-string
322+ * @throws \SimpleSAML\OpenID\Exceptions\JwsException
323323 */
324324 public function getFederationFetchEndpoint (): ?string
325325 {
@@ -339,11 +339,11 @@ public function getFederationFetchEndpoint(): ?string
339339
340340
341341 /**
342- * @throws \SimpleSAML\OpenID\Exceptions\JwsException
342+ * @return ?non-empty-string
343343 * @throws \SimpleSAML\OpenID\Exceptions\InvalidValueException
344344 * @throws \SimpleSAML\OpenID\Exceptions\OpenIdException
345345 *
346- * @return ?non-empty-string
346+ * @throws \SimpleSAML\OpenID\Exceptions\JwsException
347347 */
348348 public function getFederationTrustMarkEndpoint (): ?string
349349 {
@@ -363,11 +363,11 @@ public function getFederationTrustMarkEndpoint(): ?string
363363
364364
365365 /**
366- * @throws \SimpleSAML\OpenID\Exceptions\JwsException
366+ * @return ?non-empty-string
367367 * @throws \SimpleSAML\OpenID\Exceptions\InvalidValueException
368368 * @throws \SimpleSAML\OpenID\Exceptions\OpenIdException
369369 *
370- * @return ?non-empty-string
370+ * @throws \SimpleSAML\OpenID\Exceptions\JwsException
371371 */
372372 public function getFederationTrustMarkStatusEndpoint (): ?string
373373 {
@@ -386,6 +386,19 @@ public function getFederationTrustMarkStatusEndpoint(): ?string
386386 }
387387
388388
389+ /**
390+ * @return non-empty-string
391+ * @throws \SimpleSAML\OpenID\Exceptions\JwsException
392+ * @throws \SimpleSAML\OpenID\Exceptions\OpenId4VciProofException
393+ * @throws \SimpleSAML\OpenID\Exceptions\TrustMarkDelegationException
394+ * @throws \SimpleSAML\OpenID\Exceptions\InvalidValueException
395+ */
396+ public function getAlgorithm (): string
397+ {
398+ return parent ::getAlgorithm () ?? throw new EntityStatementException ('No Algorithm header claim found. ' );
399+ }
400+
401+
389402 /**
390403 * @throws \SimpleSAML\OpenID\Exceptions\EntityStatementException
391404 * @throws \SimpleSAML\OpenID\Exceptions\JwsException
@@ -426,6 +439,7 @@ protected function validate(): void
426439 $ this ->getExpirationTime (...),
427440 $ this ->getJwks (...),
428441 $ this ->getType (...),
442+ $ this ->getAlgorithm (...),
429443 $ this ->getKeyId (...),
430444 $ this ->getAuthorityHints (...),
431445 $ this ->getTrustAnchorHints (...),
0 commit comments