-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
440 additions
and
125 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace SimpleSAML\SAML11\XML\saml; | ||
|
||
use DOMElement; | ||
use SimpleSAML\XML\Chunk; | ||
|
||
/** | ||
* Class for unknown statements. | ||
* | ||
* @package simplesamlphp/saml11 | ||
*/ | ||
final class UnknownStatement extends AbstractStatementType | ||
{ | ||
/** | ||
* @param \SimpleSAML\XML\Chunk $chunk The whole Statement element as a chunk object. | ||
* @param string $type The xsi:type of this statement | ||
*/ | ||
public function __construct( | ||
protected Chunk $chunk, | ||
string $type, | ||
) { | ||
parent::__construct($type); | ||
} | ||
|
||
|
||
/** | ||
* Get the raw version of this statement as a Chunk. | ||
* | ||
* @return \SimpleSAML\XML\Chunk | ||
*/ | ||
public function getRawStatement(): Chunk | ||
{ | ||
return $this->chunk; | ||
} | ||
|
||
|
||
/** | ||
* Convert this unknown statement to XML. | ||
* | ||
* @param \DOMElement|null $parent The element we are converting to XML. | ||
* @return \DOMElement The XML element after adding the data corresponding to this unknown statement. | ||
*/ | ||
public function toXML(DOMElement $parent = null): DOMElement | ||
{ | ||
return $this->getRawStatement()->toXML($parent); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!DOCTYPE schema | ||
PUBLIC "-//W3C//DTD XMLSchema 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd" | ||
[ | ||
<!ATTLIST schema | ||
xmlns:ds CDATA #FIXED "urn:x-simplesamlphp:namespace"> | ||
<!ENTITY ssp 'urn:x-simplesamlphp:namespace'> | ||
<!ENTITY % p ''> | ||
<!ENTITY % s ''> | ||
]> | ||
|
||
<!-- Schema for SimpleSAMLphp dummy classes --> | ||
|
||
|
||
<schema xmlns="http://www.w3.org/2001/XMLSchema" | ||
xmlns:ssp="urn:x-simplesamlphp:namespace" | ||
xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" | ||
targetNamespace="urn:x-simplesamlphp:namespace" | ||
version="0.1" elementFormDefault="qualified"> | ||
|
||
<import namespace='urn:oasis:names:tc:SAML:1.0:assertion' | ||
schemaLocation='../../../resources/schemas/oasis-sstc-saml-schema-assertion-1.1.xsd'/> | ||
|
||
<!-- Start Chunk --> | ||
|
||
<element name="Chunk" type="string"/> | ||
|
||
<!-- End Chunk --> | ||
|
||
<!-- Start CustomStatement --> | ||
|
||
<element name="CustomStatement" type="ssp:CustomStatementType"/> | ||
<complexType name="CustomStatementType"> | ||
<complexContent> | ||
<extension base="saml:StatementAbstractType"> | ||
<sequence> | ||
<element ref="saml:Audience" maxOccurs="unbounded"/> | ||
</sequence> | ||
</extension> | ||
</complexContent> | ||
</complexType> | ||
|
||
<!-- End CustomStatement --> | ||
|
||
</schema> | ||
|
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<saml:Statement xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:ssp="urn:x-simplesamlphp:namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ssp:CustomStatementType"> | ||
<saml:Audience>urn:some:audience</saml:Audience> | ||
</saml:Statement> |
Oops, something went wrong.