Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.

Commit a63b047

Browse files
committed
Implement DOM schema validation
1 parent c8d3a5c commit a63b047

833 files changed

Lines changed: 1797 additions & 1215 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/XML/auth/AbstractAuthElement.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@ abstract class AbstractAuthElement extends AbstractElement
2020

2121
/** @var string */
2222
public const NS_PREFIX = 'auth';
23+
24+
/** @var string */
25+
public const SCHEMA = 'resources/schemas/ws-authorization.xsd';
2326
}

src/XML/auth/AdditionalContext.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44

55
namespace SimpleSAML\WSSecurity\XML\auth;
66

7+
use SimpleSAML\XML\{SchemaValidatableElementInterface, SchemaValidatableElementTrait};
8+
79
/**
810
* Class representing WS-authorization AdditionalContext.
911
*
1012
* @package simplesamlphp/ws-security
1113
*/
12-
final class AdditionalContext extends AbstractAdditionalContextType
14+
final class AdditionalContext extends AbstractAdditionalContextType implements SchemaValidatableElementInterface
1315
{
16+
use SchemaValidatableElementTrait;
1417
}

src/XML/auth/ClaimType.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44

55
namespace SimpleSAML\WSSecurity\XML\auth;
66

7+
use SimpleSAML\XML\{SchemaValidatableElementInterface, SchemaValidatableElementTrait};
8+
79
/**
810
* Class representing WS-authorization ClaimType.
911
*
1012
* @package simplesamlphp/ws-security
1113
*/
12-
final class ClaimType extends AbstractClaimType
14+
final class ClaimType extends AbstractClaimType implements SchemaValidatableElementInterface
1315
{
16+
use SchemaValidatableElementTrait;
1417
}

src/XML/fed/AbstractFedElement.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@ abstract class AbstractFedElement extends AbstractElement
2020

2121
/** @var string */
2222
public const NS_PREFIX = 'fed';
23+
24+
/** @var string */
25+
public const SCHEMA = 'resources/schemas/ws-federation.xsd';
2326
}

src/XML/fed/AdditionalContextProcessed.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44

55
namespace SimpleSAML\WSSecurity\XML\fed;
66

7+
use SimpleSAML\XML\{SchemaValidatableElementInterface, SchemaValidatableElementTrait};
8+
79
/**
810
* An AdditionalContextProcessed element
911
*
1012
* @package simplesamlphp/ws-security
1113
*/
12-
final class AdditionalContextProcessed extends AbstractAssertionType
14+
final class AdditionalContextProcessed extends AbstractAssertionType implements SchemaValidatableElementInterface
1315
{
16+
use SchemaValidatableElementTrait;
1417
}

src/XML/fed/ApplicationServiceEndpoint.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44

55
namespace SimpleSAML\WSSecurity\XML\fed;
66

7+
use SimpleSAML\XML\{SchemaValidatableElementInterface, SchemaValidatableElementTrait};
8+
79
/**
810
* Class defining the ApplicationServiceEndpoint element
911
*
1012
* @package simplesamlphp/ws-security
1113
*/
12-
final class ApplicationServiceEndpoint extends AbstractEndpointType
14+
final class ApplicationServiceEndpoint extends AbstractEndpointType implements SchemaValidatableElementInterface
1315
{
16+
use SchemaValidatableElementTrait;
1417
}

src/XML/fed/AttributeServiceEndpoint.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44

55
namespace SimpleSAML\WSSecurity\XML\fed;
66

7+
use SimpleSAML\XML\{SchemaValidatableElementInterface, SchemaValidatableElementTrait};
8+
79
/**
810
* Class defining the AttributeServiceEndpoint element
911
*
1012
* @package simplesamlphp/ws-security
1113
*/
12-
final class AttributeServiceEndpoint extends AbstractEndpointType
14+
final class AttributeServiceEndpoint extends AbstractEndpointType implements SchemaValidatableElementInterface
1315
{
16+
use SchemaValidatableElementTrait;
1417
}

src/XML/fed/AttributeServiceEndpoints.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44

55
namespace SimpleSAML\WSSecurity\XML\fed;
66

7+
use SimpleSAML\XML\{SchemaValidatableElementInterface, SchemaValidatableElementTrait};
8+
79
/**
810
* Class defining the AttributeServiceEndpoints element
911
*
1012
* @package simplesamlphp/ws-security
1113
*/
12-
final class AttributeServiceEndpoints extends AbstractEndpointType
14+
final class AttributeServiceEndpoints extends AbstractEndpointType implements SchemaValidatableElementInterface
1315
{
16+
use SchemaValidatableElementTrait;
1417
}

src/XML/fed/AuthenticationToken.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,23 @@
55
namespace SimpleSAML\WSSecurity\XML\fed;
66

77
use SimpleSAML\WSSecurity\XML\sp_200702\AbstractNestedPolicyType;
8+
use SimpleSAML\XML\{SchemaValidatableElementInterface, SchemaValidatableElementTrait};
89

910
/**
1011
* An AuthenticationToken element
1112
*
1213
* @package simplesamlphp/ws-security
1314
*/
14-
final class AuthenticationToken extends AbstractNestedPolicyType
15+
final class AuthenticationToken extends AbstractNestedPolicyType implements SchemaValidatableElementInterface
1516
{
17+
use SchemaValidatableElementTrait;
18+
1619
/** @var string */
1720
public const NS = AbstractFedElement::NS;
1821

1922
/** @var string */
2023
public const NS_PREFIX = AbstractFedElement::NS_PREFIX;
24+
25+
/** @var string */
26+
public const SCHEMA = AbstractFedElement::SCHEMA;
2127
}

src/XML/fed/AutomaticPseudonyms.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use DOMElement;
88
use SimpleSAML\Assert\Assert;
99
use SimpleSAML\XML\Exception\InvalidDOMElementException;
10+
use SimpleSAML\XML\{SchemaValidatableElementInterface, SchemaValidatableElementTrait};
1011
use SimpleSAML\XML\StringElementTrait;
1112

1213
use function in_array;
@@ -17,8 +18,9 @@
1718
*
1819
* @package simplesamlphp/ws-security
1920
*/
20-
final class AutomaticPseudonyms extends AbstractFedElement
21+
final class AutomaticPseudonyms extends AbstractFedElement implements SchemaValidatableElementInterface
2122
{
23+
use SchemaValidatableElementTrait;
2224
use StringElementTrait;
2325

2426

0 commit comments

Comments
 (0)