ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
class.ilAuthProvider.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 abstract class ilAuthProvider implements ilAuthProviderInterface
22 {
23  private ilLogger $logger;
25 
26  public function __construct(ilAuthCredentials $credentials)
27  {
28  global $DIC;
29  $this->logger = $DIC->logger()->auth();
30  $this->credentials = $credentials;
31  }
32 
33  public function getLogger(): ilLogger
34  {
35  return $this->logger;
36  }
37 
38  public function getCredentials(): ilAuthCredentials
39  {
40  return $this->credentials;
41  }
42 
43  protected function handleAuthenticationFail(ilAuthStatus $status, string $a_reason): bool
44  {
46  $status->setReason($a_reason);
47  return false;
48  }
49 }
handleAuthenticationFail(ilAuthStatus $status, string $a_reason)
setStatus(int $a_status)
Set auth status.
global $DIC
Definition: shib_login.php:26
ilAuthCredentials $credentials
const int STATUS_AUTHENTICATION_FAILED
setReason(string $a_reason)
Set reason.
__construct(ilAuthCredentials $credentials)