Skip to content

Commit

Permalink
Fix QA-issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen authored Oct 31, 2024
1 parent ab76145 commit 8a2e488
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/Connector/Ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,18 @@ public function bind(?string $username, #[\SensitiveParameter]?string $password)
/**
* @inheritDoc
*/
public function saslBind(?string $username, #[\SensitiveParameter]?string $password, ?string $mech, ?string $realm, ?string $authcId, ?string $authzId, ?string $props): void

{
if (!method_exists($this->connection, 'saslBind'))
public function saslBind(
?string $username,
#[\SensitiveParameter]?string $password,
?string $mech,
?string $realm,
?string $authcId,
?string $authzId,
?string $props,
): void {
if (!method_exists($this->connection, 'saslBind')) {
throw new Error\Error("SASL not implemented");
}

try {
$this->connection->saslBind($username, strval($password), $mech, $realm, $authcId, $authzId, $props);
Expand All @@ -136,8 +143,9 @@ public function saslBind(?string $username, #[\SensitiveParameter]?string $passw
*/
public function whoami(): string
{
if (!method_exists($this->connection, 'whoami'))
if (!method_exists($this->connection, 'whoami')) {
throw new Error\Error("SASL not implemented");
}

return $this->connection->whoami();
}
Expand Down

0 comments on commit 8a2e488

Please sign in to comment.