diff --git a/src/Saml2/Settings.php b/src/Saml2/Settings.php index c750608e..53261ffb 100644 --- a/src/Saml2/Settings.php +++ b/src/Saml2/Settings.php @@ -879,14 +879,15 @@ public function getIdPSLOResponseUrl() * $advancedSettings['security']['wantAssertionsEncrypted'] are enabled. * @param int|null $validUntil Metadata's valid time * @param int|null $cacheDuration Duration of the cache in seconds + * @param bool $ignoreValidUntil exclude the validUntil tag from metadata * * @return string SP metadata (xml) * @throws Exception * @throws Error */ - public function getSPMetadata($alwaysPublishEncryptionCert = false, $validUntil = null, $cacheDuration = null) + public function getSPMetadata($alwaysPublishEncryptionCert = false, $validUntil = null, $cacheDuration = null, $ignoreValidUntil = false) { - $metadata = Metadata::builder($this->_sp, $this->_security['authnRequestsSigned'], $this->_security['wantAssertionsSigned'], $validUntil, $cacheDuration, $this->getContacts(), $this->getOrganization()); + $metadata = Metadata::builder($this->_sp, $this->_security['authnRequestsSigned'], $this->_security['wantAssertionsSigned'], $validUntil, $cacheDuration, $this->getContacts(), $this->getOrganization(), [], $ignoreValidUntil); $certNew = $this->getSPcertNew(); if (!empty($certNew)) {