File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 66
77use DOMElement ;
88use SimpleSAML \SAML2 \Assert \Assert ;
9+ use SimpleSAML \SAML2 \Constants as C ;
910use SimpleSAML \SAML2 \Exception \ArrayValidationException ;
11+ use SimpleSAML \SAML2 \Exception \ProtocolViolationException ;
1012use SimpleSAML \SAML2 \Type \SAMLAnyURIValue ;
1113use SimpleSAML \SAML2 \Type \SAMLStringValue ;
1214use SimpleSAML \XML \ArrayizableElementInterface ;
@@ -45,6 +47,15 @@ public function __construct(
4547 protected ?SAMLStringValue $ SPNameQualifier = null ,
4648 protected ?BooleanValue $ AllowCreate = null ,
4749 ) {
50+ if ($ AllowCreate ->equals (BooleanValue::fromBoolean (true )) {
51+ // Per Errata E14: AllowCreate
52+ Assert::notSame (
53+ $ Format ->getValue (),
54+ C::NAMEID_TRANSIENT ,
55+ ProtocolViolationException::class,
56+ "AllowCreate=true MUST NOT be used in conjunction with the urn:oasis:names:tc:SAML:2.0:nameidformat:transient <NameID> Format. " ,
57+ );
58+ }
4859 }
4960
5061
You can’t perform that action at this time.
0 commit comments