Skip to content

Commit

Permalink
replace getBoolean with getOptionalBoolean
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Jul 3, 2024
1 parent efcce39 commit e7a995e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions modules/sildisco/public/metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
$config = \SimpleSAML\Configuration::getInstance();
$metadata = \SimpleSAML\Metadata\MetaDataStorageHandler::getMetadataHandler();

if (!$config->getBoolean('enable.saml20-idp', false)) {
if (!$config->getOptionalBoolean('enable.saml20-idp', false)) {
throw new \SimpleSAML\Error\Error('NOACCESS');
}

// check if valid local session exists
//$authUtils = new Auth();
//if ($config->getBoolean('admin.protectmetadata', false)) {
//if ($config->getOptionalBoolean('admin.protectmetadata', false)) {
// $authUtils->requireAdmin();
//}

Expand Down Expand Up @@ -116,7 +116,7 @@

$httpUtils = new HTTP();

if ($idpmeta->getBoolean('saml20.sendartifact', false)) {
if ($idpmeta->getOptionalBoolean('saml20.sendartifact', false)) {
// Artifact sending enabled
$metaArray['ArtifactResolutionService'][] = array(
'index' => 0,
Expand All @@ -125,7 +125,7 @@
);
}

if ($idpmeta->getBoolean('saml20.hok.assertion', false)) {
if ($idpmeta->getOptionalBoolean('saml20.hok.assertion', false)) {
// Prepend HoK SSO Service endpoint.
array_unshift($metaArray['SingleSignOnService'], array(
'hoksso:ProtocolBinding' => Constants::BINDING_HTTP_REDIRECT,
Expand Down
2 changes: 1 addition & 1 deletion modules/sildisco/src/IdPDisco.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ protected function validateIdP(?string $idp): ?string
if ($idp === null) {
return null;
}
if (!$this->config->getBoolean('idpdisco.validate', true)) {
if (!$this->config->getOptionalBoolean('idpdisco.validate', true)) {
return $idp;
}

Expand Down

0 comments on commit e7a995e

Please sign in to comment.