Skip to content

Commit

Permalink
Allow false return
Browse files Browse the repository at this point in the history
  • Loading branch information
Daynnnnn committed Sep 17, 2024
1 parent 2ad88a9 commit 18fe4f1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/AuthServices/AuthServiceContract.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

interface AuthServiceContract
{
public function checkCredentialsAgainstForwardAuth(array $credentials): array;
public function checkCredentialsAgainstForwardAuth(array $credentials): array|false;

public function credentialsValidAgainstForwardAuth(): bool;

Expand Down
2 changes: 1 addition & 1 deletion src/AuthServices/HttpAuthService.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function __construct() {
$this->data = config("statamic.forward-authentication.data");
}

public function checkCredentialsAgainstForwardAuth(array $credentials): array {
public function checkCredentialsAgainstForwardAuth(array $credentials): array|false {
return $this->forwardAuthUser = Http::post($this->config['address'], $credentials)->json();
}

Expand Down
2 changes: 1 addition & 1 deletion src/AuthServices/LdapAuthService.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct() {
$this->data = config("statamic.forward-authentication.data");
}

public function checkCredentialsAgainstForwardAuth(array $credentials): array {
public function checkCredentialsAgainstForwardAuth(array $credentials): array|false {
$connectionConfig = [
'hosts' => $this->config['hosts'],
'port' => $this->config['port'],
Expand Down

0 comments on commit 18fe4f1

Please sign in to comment.