-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change getString to getOptionalString where a default is provided
- Loading branch information
Showing
2 changed files
with
6 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,9 @@ | |
require_once('../public/_include.php'); | ||
|
||
use SAML2\Constants; | ||
use SimpleSAML\Utils\Auth as Auth; | ||
use SimpleSAML\Utils\Config\Metadata as Metadata; | ||
use SimpleSAML\Utils\Crypto as Crypto; | ||
use SimpleSAML\Utils\HTTP as HTTP; | ||
use SimpleSAML\Utils\Config\Metadata as Metadata; | ||
|
||
// load SimpleSAMLphp, configuration and metadata | ||
$config = \SimpleSAML\Configuration::getInstance(); | ||
|
@@ -135,7 +134,7 @@ | |
)); | ||
} | ||
|
||
$metaArray['NameIDFormat'] = $idpmeta->getString( | ||
$metaArray['NameIDFormat'] = $idpmeta->getOptionalString( | ||
'NameIDFormat', | ||
'urn:oasis:names:tc:SAML:2.0:nameid-format:transient' | ||
); | ||
|
@@ -193,10 +192,10 @@ | |
} | ||
} | ||
|
||
$technicalContactEmail = $config->getString('technicalcontact_email', false); | ||
$technicalContactEmail = $config->getOptionalString('technicalcontact_email', false); | ||
if ($technicalContactEmail && $technicalContactEmail !== '[email protected]') { | ||
$techcontact['emailAddress'] = $technicalContactEmail; | ||
$techcontact['name'] = $config->getString('technicalcontact_name', null); | ||
$techcontact['name'] = $config->getOptionalString('technicalcontact_name', null); | ||
$techcontact['contactType'] = 'technical'; | ||
$metaArray['contacts'][] = Metadata::getContact($techcontact); | ||
} | ||
|