File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,26 @@ public function __construct(
9595 return $ statement instanceof AuthnStatement;
9696 }));
9797
98+ if (count ($ authnStatements ) > 0 ) {
99+ Assert::notNull (
100+ $ subject ,
101+ "Assertions containing an <AuthnStatement> element MUST contain a <Subject> element. " ,
102+ ProtocolViolationException::class,
103+ );
104+ }
105+
106+ $ authzDecisionStatements = array_values (array_filter ($ statements , function ($ statement ) {
107+ return $ statement instanceof AuthzDecisionStatement;
108+ }));
109+
110+ if (count ($ authzDecisionStatements ) > 0 ) {
111+ Assert::notNull (
112+ $ subject ,
113+ "Assertions containing an <AuthzDecisionStatement> element MUST contain a <Subject> element. " ,
114+ ProtocolViolationException::class,
115+ );
116+ }
117+
98118 $ attributeStatements = array_values (array_filter ($ statements , function ($ statement ) {
99119 return $ statement instanceof AttributeStatement;
100120 }));
You can’t perform that action at this time.
0 commit comments