Skip to content

Commit d982434

Browse files
committed
Add missing KeyInfoConfirmationData-type
1 parent c36ad98 commit d982434

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace SimpleSAML\SAML2\XML\saml;
6+
7+
use SimpleSAML\SAML2\Assert\Assert;
8+
use SimpleSAML\XMLSchema\Exception\MissingElementException;
9+
use SimpleSAML\XMLSchema\Exception\SchemaViolationException;
10+
use SimpleSAML\XMLSecurity\XML\ds\KeyInfo;
11+
12+
/**
13+
* Abstract class representing SAML 2 KeyInfoConfirmationData element.
14+
*
15+
* @package simplesamlphp/saml2
16+
*/
17+
abstract class AbstractKeyInfoConfirmationData extends AbstractSubjectConfirmationData
18+
{
19+
/**
20+
* Initialize (and parse) a KeyInfoConfirmationData element.
21+
*
22+
* @param \SimpleSAML\XMLSecurity\XML\ds\KeyInfo[] $keyInfo
23+
*/
24+
public function __construct(
25+
array $keyInfo = [],
26+
) {
27+
Assert::allIsInstanceOf($keyInfo, KeyInfo::class, SchemaViolationException::class);
28+
Assert::minCount($keyInfo, 1, MissingElementException::class);
29+
30+
parent::__construct(null, null, null, null, null, $keyInfo, []);
31+
}
32+
}

0 commit comments

Comments
 (0)