|
18 | 18 | use SimpleSAML\SAML2\Constants as C; |
19 | 19 | use SimpleSAML\SAML2\Exception\ArrayValidationException; |
20 | 20 | use SimpleSAML\SAML2\XML\md\ContactPerson; |
21 | | -use SimpleSAML\SAML2\XML\saml\{AttributeValue, Issuer, NameID, SubjectConfirmation, SubjectConfirmationData}; |
| 21 | +use SimpleSAML\SAML2\XML\saml\{AttributeValue, Audience, Issuer, NameID, SubjectConfirmation, SubjectConfirmationData}; |
22 | 22 | use SimpleSAML\SAML2\XML\saml\{AuthenticatingAuthority, AuthnContext, AuthnContextClassRef}; // AuthnContext |
23 | 23 | use SimpleSAML\SAML2\XML\samlp\{Status, StatusCode, StatusMessage}; // Status |
24 | 24 | use SimpleSAML\XML\DOMDocumentFactory; |
|
27 | 27 | use Symfony\Component\HttpFoundation\{Request, Response}; |
28 | 28 |
|
29 | 29 | use function array_key_exists; |
| 30 | +use function array_map; |
30 | 31 | use function array_merge; |
31 | 32 | use function array_pop; |
32 | 33 | use function array_unique; |
@@ -1168,8 +1169,9 @@ private static function buildAssertion( |
1168 | 1169 | $issuer->setFormat(C::NAMEID_ENTITY); |
1169 | 1170 | $a->setIssuer($issuer); |
1170 | 1171 |
|
1171 | | - $audience = array_merge([$spMetadata->getString('entityid')], $spMetadata->getOptionalArray('audience', [])); |
1172 | | - $a->setValidAudiences($audience); |
| 1172 | + $audiences = array_merge([$spMetadata->getString('entityid')], $spMetadata->getOptionalArray('audience', [])); |
| 1173 | + $audiences = array_map(fn($audience): Audience => new Audience($audience), $audiences); |
| 1174 | + $a->setValidAudiences($audiences); |
1173 | 1175 |
|
1174 | 1176 | $a->setNotBefore($now - 30); |
1175 | 1177 |
|
|
0 commit comments