-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix possibility to add namespaced attributes to md:RoleDescriptorType
- Loading branch information
Showing
7 changed files
with
23 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ final class AuthnAuthorityDescriptor extends AbstractRoleDescriptorType | |
* @param \SimpleSAML\SAML2\XML\md\Organization|null $organization | ||
* @param array $keyDescriptor | ||
* @param array $contact | ||
* @param list<\SimpleSAML\XML\Attribute> | ||
*/ | ||
public function __construct( | ||
Check warning on line 41 in src/SAML2/XML/md/AuthnAuthorityDescriptor.php GitHub Actions / Quality controlInvalidDocblock
|
||
protected array $authnQueryService, | ||
|
@@ -50,6 +51,7 @@ public function __construct( | |
?Organization $organization = null, | ||
array $keyDescriptor = [], | ||
array $contact = [], | ||
array $namespacedAttributes = [], | ||
) { | ||
Assert::maxCount($authnQueryService, C::UNBOUNDED_LIMIT); | ||
Assert::minCount($authnQueryService, 1, 'Missing at least one AuthnQueryService in AuthnAuthorityDescriptor.'); | ||
|
@@ -77,6 +79,7 @@ public function __construct( | |
$keyDescriptor, | ||
$organization, | ||
$contact, | ||
$namespacedAttributes, | ||
); | ||
} | ||
|
||
|
@@ -178,11 +181,14 @@ public static function fromXML(DOMElement $xml): static | |
!empty($orgs) ? $orgs[0] : null, | ||
KeyDescriptor::getChildrenOfClass($xml), | ||
ContactPerson::getChildrenOfClass($xml), | ||
self::getAttributesNSFromXML($xml), | ||
); | ||
|
||
if (!empty($signature)) { | ||
$authority->setSignature($signature[0]); | ||
$authority->setXML($xml); | ||
} | ||
|
||
return $authority; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ final class PDPDescriptor extends AbstractRoleDescriptorType | |
* @param \SimpleSAML\SAML2\XML\md\Organization|null $organization | ||
* @param \SimpleSAML\SAML2\XML\md\KeyDescriptor[] $keyDescriptors | ||
* @param \SimpleSAML\SAML2\XML\md\ContactPerson[] $contacts | ||
* @param list<\SimpleSAML\XML\Attribute> | ||
*/ | ||
public function __construct( | ||
Check warning on line 41 in src/SAML2/XML/md/PDPDescriptor.php GitHub Actions / Quality controlInvalidDocblock
|
||
protected array $authzService, | ||
|
@@ -50,6 +51,7 @@ public function __construct( | |
?Organization $organization = null, | ||
array $keyDescriptors = [], | ||
array $contacts = [], | ||
array $namespacedAttributes = [], | ||
) { | ||
Assert::maxCount($authzService, C::UNBOUNDED_LIMIT); | ||
Assert::minCount($authzService, 1, 'At least one md:AuthzService endpoint must be present.'); | ||
|
@@ -77,6 +79,7 @@ public function __construct( | |
$keyDescriptors, | ||
$organization, | ||
$contacts, | ||
$namespacedAttributes, | ||
); | ||
} | ||
|
||
|
@@ -168,6 +171,7 @@ public static function fromXML(DOMElement $xml): static | |
!empty($orgs) ? $orgs[0] : null, | ||
KeyDescriptor::getChildrenOfClass($xml), | ||
ContactPerson::getChildrenOfClass($xml), | ||
self::getAttributesNSFromXML($xml), | ||
); | ||
|
||
if (!empty($signature)) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters