Skip to content

Commit

Permalink
Properly pass options to ldap-connector
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Feb 14, 2024
1 parent d1cb741 commit a1eb4e4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/TestCase/AuthSource/Ldap/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ final class Configuration extends \SimpleSAML\Module\monitor\TestCaseFactory
/** @var bool */
private bool $debug = false;

/** @var array */
private array $options = [];


/**
* @param \SimpleSAML\Module\monitor\TestData $testData
Expand All @@ -52,6 +55,10 @@ protected function initialize(TestData $testData): void
$this->timeout = $authSourceData->getOptionalInteger('timeout', 3);
$this->referrals = $authSourceData->getOptionalBoolean('referrals', false);
$this->debug = $authSourceData->getOptionalBoolean('debug', false);
$this->options = $authSourceData->getOptionalArray(
'opions',
['network_timeout' => $this->timeout, 'referrals' => $this->referrals],
);

$this->setSubject($this->hostname);

Expand Down Expand Up @@ -79,7 +86,7 @@ public function invokeTest(): void
$this->version,
'ext_ldap',
$this->debug,
['network_timeout' => $this->timeout, 'referrals' => $this->referrals],
$this->options,
);
$state = State::OK;
} catch (Exception $error) {
Expand Down

0 comments on commit a1eb4e4

Please sign in to comment.