Skip to content
Snippets Groups Projects
Commit 8b1e5edb authored by Tim van Dijen's avatar Tim van Dijen Committed by Tim van Dijen
Browse files

Allow additional Audiences to be specified (#1345)

parent 4b8092df
No related branches found
No related tags found
No related merge requests found
...@@ -168,6 +168,9 @@ The following SAML 2.0 options are available: ...@@ -168,6 +168,9 @@ The following SAML 2.0 options are available:
: (This option was previously named `AttributeNameFormat`.) : (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` `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. : 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.
......
...@@ -1144,7 +1144,9 @@ class SAML2 ...@@ -1144,7 +1144,9 @@ class SAML2
$issuer->setValue($idpMetadata->getString('entityid')); $issuer->setValue($idpMetadata->getString('entityid'));
$issuer->setFormat(Constants::NAMEID_ENTITY); $issuer->setFormat(Constants::NAMEID_ENTITY);
$a->setIssuer($issuer); $a->setIssuer($issuer);
$a->setValidAudiences([$spMetadata->getString('entityid')]);
$audience = array_merge([$spMetadata->getString('entityid')], $spMetadata->getArray('audience', []));
$a->setValidAudiences($audience);
$a->setNotBefore($now - 30); $a->setNotBefore($now - 30);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment