33 $this->lng = $DIC->language();
46 $this->
getLogger()->debug(
'Logging out with token: ' . $id_token);
49 if (is_string($id_token) && $id_token !==
'') {
55 ILIAS_HTTP_PATH .
'/logout.php' 57 }
catch (\Jumbojett\OpenIDConnectClientException
$e) {
58 $this->
getLogger()->warning(
"Logging out of OIDC provider failed with: " . $e->getMessage());
72 $oidc->setRedirectURL(ILIAS_HTTP_PATH .
'/openidconnect.php');
75 if ($proxy->isActive()) {
76 $host = $proxy->getHost();
77 $port = $proxy->getPort();
81 $oidc->setHttpProxy($host);
86 $oidc->getRedirectURL()
89 $oidc->addScope($this->
settings->getAllScopes());
90 switch ($this->
settings->getLoginPromptType()) {
92 $oidc->addAuthParam([
'prompt' =>
'login']);
96 $oidc->authenticate();
100 $claims = $oidc->getVerifiedClaims(null);
108 $token = $oidc->requestUserInfo();
113 $this->
getLogger()->warning($e->getMessage());
114 $this->
getLogger()->warning($e->getCode());
128 if (!is_object($user_info)) {
129 $this->
getLogger()->error(
'Received invalid user credentials: ');
136 $uid_field = $this->
settings->getUidField();
137 $ext_account = $user_info->$uid_field;
139 $this->
getLogger()->debug(
'Authenticated external account: ' . $ext_account);
149 if (!is_string($ext_account)) {
154 $sync->setExternalAccount($ext_account);
155 $sync->setInternalAccount($int_account);
178 $oidc =
new OpenIDConnectClient(
doAuthentication(\ilAuthStatus $status)
Do authentication.
const LOGOUT_SCOPE_GLOBAL
Interface of auth credentials.
Class ilOpenIdConnectSettingsGUI.
const STATUS_AUTHENTICATION_FAILED
static get($a_var)
Get a value.
static set($a_var, $a_val)
Set a value.
handleLogout()
Handle logout event.
setTranslatedReason($a_reason)
Set translated reason.
static getInstance()
Get singleton instance.
setAuthenticatedUserId($a_id)
Base class for authentication providers (radius, ldap, apache, ...)
Standard interface for auth provider implementations.
setStatus($a_status)
Set auth status.
Class ilAuthProviderOpenIdConnect.
setReason($a_reason)
Set reason.
static _checkExternalAuthAccount($a_auth, $a_account, $tryFallback=true)
check whether external account and authentication method matches with a user
Class ilOpenIdConnectSettingsGUI.
const STATUS_AUTHENTICATED
__construct(Container $dic, ilPlugin $plugin)
handleUpdate(ilAuthStatus $status, $user_info)
Auth status implementation.
static _getInstance()
Getter for unique instance.
__construct(ilAuthCredentials $credentials)
ilAuthProviderOpenIdConnect constructor.