27 parent::__construct($credentials);
41 $this->
getLogger()->debug(
'Using token: ' . $auth_token);
43 if (strlen($auth_token)) {
48 ILIAS_HTTP_PATH .
'/logout.php' 62 $oidc->setRedirectURL(ILIAS_HTTP_PATH .
'/openidconnect.php');
66 $oidc->getRedirectURL()
69 $oidc->setResponseTypes(
84 $oidc->addAuthParam([
'response_mode' =>
'form_post']);
85 switch ($this->
settings->getLoginPromptType()) {
87 $oidc->addAuthParam([
'prompt' =>
'login']);
90 $oidc->setAllowImplicitFlow(
true);
92 $oidc->authenticate();
96 $claims =
$oidc->getVerifiedClaims(null);
109 $this->
getLogger()->warning($e->getMessage());
110 $this->
getLogger()->warning($e->getCode());
124 if (!is_object($user_info)) {
125 $this->
getLogger()->error(
'Received invalid user credentials: ');
132 $uid_field = $this->
settings->getUidField();
133 $ext_account = $user_info->$uid_field;
135 $this->
getLogger()->debug(
'Authenticated external account: ' . $ext_account);
145 if (!is_string($ext_account)) {
150 $sync->setExternalAccount($ext_account);
151 $sync->setInternalAccount($int_account);
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
handleUpdate(ilAuthStatus $status, $user_info)
Auth status implementation.
__construct(ilAuthCredentials $credentials)
ilAuthProviderOpenIdConnect constructor.
Require the CURL and JSON PHP extensions to be installed.