Skip to content

Commit

Permalink
Removing fallback logic about authSource (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilario-pierbattista authored Jan 14, 2021
1 parent eb8cf98 commit 6fefc05
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Services/ClientRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,8 @@ public function getClient(string $name, ?string $databaseName = null): Client
if (! isset($this->clients[$clientKey])) {
$conf = $this->configurations[$name];
$options = array_merge(
[
'database' => $databaseName,
'authSource' => $conf->getAuthSource() ?? $databaseName ?? 'admin',
],
['database' => $databaseName],
$conf->getAuthSource() !== null ? ['authSource' => $conf->getAuthSource()] : [],
$conf->getOptions()
);
$this->clients[$clientKey] = $this->buildClient($name, $conf->getUri(), $options, $conf->getDriverOptions());
Expand Down

0 comments on commit 6fefc05

Please sign in to comment.