32 $this->lng = $DIC->language();
45 $this->
getLogger()->debug(
'Using token: ' . $auth_token);
47 if (strlen($auth_token)) {
70 $oidc->getRedirectURL()
73 $oidc->setResponseTypes(
88 $oidc->addAuthParam([
'response_mode' =>
'form_post']);
89 switch ($this->
settings->getLoginPromptType()) {
91 $oidc->addAuthParam([
'prompt' =>
'login']);
94 $oidc->setAllowImplicitFlow(
true);
96 $oidc->authenticate();
100 $claims = $oidc->getVerifiedClaims(null);
108 $token = $oidc->requestClientCredentialsToken();
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.
__construct(ilAuthCredentials $credentials)
ilAuthProviderOpenIdConnect constructor.