Skip to content
Snippets Groups Projects
Unverified Commit 0cbc6203 authored by Tim van Dijen's avatar Tim van Dijen Committed by GitHub
Browse files

Allow additional Audiences to be specified (#1345)

parent caeb8d04
No related branches found
No related tags found
No related merge requests found
......@@ -160,6 +160,9 @@ The following options can be set:
: (This option was previously named `AttributeNameFormat`.)
`audience`
: An array of additional entities to be added to the AudienceRestriction. By default the only audience is the SP's entityID.
`certData`
: The base64 encoded certificate for this SP. This is an alternative to storing the certificate in a file on disk and specifying the filename in the `certificate`-option.
......
......@@ -1126,7 +1126,9 @@ class SAML2
$issuer->setValue($idpMetadata->getString('entityid'));
$issuer->setFormat(Constants::NAMEID_ENTITY);
$a->setIssuer($issuer);
$a->setValidAudiences([$spMetadata->getString('entityid')]);
$audience = array_merge([$spMetadata->getString('entityid')], $spMetadata->getArray('audience', []));
$a->setValidAudiences($audience);
$a->setNotBefore($now - 30);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment