Class ilAuthProviderOpenIdConnect.
More...
◆ __construct()
◆ doAuthentication()
| ilAuthProviderOpenIdConnect::doAuthentication |
( |
ilAuthStatus |
$status | ) |
|
Definition at line 70 of file class.ilAuthProviderOpenIdConnect.php.
References $claims, Vendor\Package\$e, ilProxySettings\_getInstance(), ilLogLevel\DEBUG, handleUpdate(), initClient(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), ilOpenIdConnectSettings\LOGIN_ENFORCE, ilOpenIdConnectSettings\LOGOUT_SCOPE_GLOBAL, ilSession\set(), ilAuthStatus\setStatus(), ILIAS\Repository\settings(), ilAuthStatus\setTranslatedReason(), and ilAuthStatus\STATUS_AUTHENTICATION_FAILED.
74 $oidc->setRedirectURL(ILIAS_HTTP_PATH .
'/openidconnect.php');
77 if ($proxy->isActive()) {
78 $host = $proxy->getHost();
79 $port = $proxy->getPort();
83 $oidc->setHttpProxy($host);
88 $oidc->getRedirectURL()
91 $oidc->addScope($this->
settings->getAllScopes());
93 $oidc->addAuthParam([
'prompt' =>
'login']);
96 $oidc->authenticate();
99 $claims = $oidc->getVerifiedClaims();
111 $this->
logger->warning($e->getMessage());
112 $this->
logger->warning((
string) $e->getCode());
const LOGOUT_SCOPE_GLOBAL
const STATUS_AUTHENTICATION_FAILED
setStatus(int $a_status)
Set auth status.
handleUpdate(ilAuthStatus $status, $user_info)
setTranslatedReason(string $a_reason)
Set translated reason.
static set(string $a_var, $a_val)
Set a value.
◆ handleLogout()
| ilAuthProviderOpenIdConnect::handleLogout |
( |
| ) |
|
◆ handleUpdate()
| ilAuthProviderOpenIdConnect::handleUpdate |
( |
ilAuthStatus |
$status, |
|
|
|
$user_info |
|
) |
| |
|
private |
- Parameters
-
- Returns
- ilAuthStatus
Definition at line 125 of file class.ilAuthProviderOpenIdConnect.php.
References Vendor\Package\$e, ilAuthProvider\$status, ilAuthProvider\$user_id, ilObjUser\_checkExternalAuthAccount(), ilOpenIdConnectUserSync\AUTH_MODE, ilAuthUtils\AUTH_OPENID_CONNECT, ilLogLevel\ERROR, ILIAS\Repository\logger(), ilSession\set(), ilAuthStatus\setReason(), ilAuthStatus\setStatus(), ILIAS\Repository\settings(), ilAuthStatus\STATUS_AUTHENTICATED, and ilAuthStatus\STATUS_AUTHENTICATION_FAILED.
Referenced by doAuthentication().
127 if (!is_object($user_info)) {
128 $this->
logger->error(
'Received invalid user credentials: ');
135 $uid_field = $this->
settings->getUidField();
136 $ext_account = $user_info->{$uid_field} ??
'';
138 if (!is_string($ext_account) || $ext_account ===
'') {
139 $this->
logger->error(
'Could not determine valid external account, value is empty or not a string.');
146 $this->
logger->debug(
'Authenticated external account: ' . $ext_account);
155 $sync->setExternalAccount($ext_account);
156 $sync->setInternalAccount((
string) $int_account);
const AUTH_OPENID_CONNECT
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const STATUS_AUTHENTICATION_FAILED
static _checkExternalAuthAccount(string $a_auth, string $a_account, bool $tryFallback=true)
check whether external account and authentication method matches with a user
setStatus(int $a_status)
Set auth status.
const STATUS_AUTHENTICATED
setReason(string $a_reason)
Set reason.
setAuthenticatedUserId(int $a_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static set(string $a_var, $a_val)
Set a value.
◆ initClient()
| ilAuthProviderOpenIdConnect::initClient |
( |
| ) |
|
|
private |
◆ $lng
◆ $logger
| ilLogger ilAuthProviderOpenIdConnect::$logger |
|
private |
◆ $settings
◆ OIDC_AUTH_IDTOKEN
| const ilAuthProviderOpenIdConnect::OIDC_AUTH_IDTOKEN = "oidc_auth_idtoken" |
|
private |
The documentation for this class was generated from the following file: