summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.php28
1 files changed, 0 insertions, 28 deletions
diff --git a/init.php b/init.php
index e5590ec..f5731e8 100644
--- a/init.php
+++ b/init.php
@@ -38,7 +38,6 @@ class Auth_OIDC extends Auth_Base {
if (Config::get(self::AUTH_OIDC_URL)) {
$host->add_hook($host::HOOK_AUTH_USER, $this);
$host->add_hook($host::HOOK_LOGINFORM_ADDITIONAL_BUTTONS, $this);
- $host->add_hook($host::HOOK_VALIDATE_SESSION, $this);
if (Config::get(self::AUTH_OIDC_POST_LOGOUT_URL) != "")
$host->add_hook($host::HOOK_POST_LOGOUT, $this);
@@ -93,9 +92,6 @@ class Auth_OIDC extends Auth_Base {
}
}
- $_SESSION["auth_oidc:refresh_token"] = $oidc->getRefreshToken();
- $_SESSION["auth_oidc:refresh_token_last_check"] = time();
-
return $user_id;
} catch (Exception $e) {
@@ -106,30 +102,6 @@ class Auth_OIDC extends Auth_Base {
return false;
}
- function hook_validate_session(): bool {
- $refresh_token = $_SESSION["auth_oidc:refresh_token"] ?? false;
-
- if ($refresh_token && $_SESSION["auth_oidc:refresh_token_last_check"] < time() - Config::get(self::AUTH_OIDC_VALIDATE_INTERVAL)) {
- $oidc = new OpenIDConnectClient(Config::get(self::AUTH_OIDC_URL),
- Config::get(self::AUTH_OIDC_CLIENT_ID),
- Config::get(self::AUTH_OIDC_CLIENT_SECRET));
-
- try {
- $result = $oidc->introspectToken($refresh_token);
-
- if ($result->active)
- $_SESSION["auth_oidc:refresh_token_last_check"] = time();
-
- return $result->active;
- } catch (Exception $e) {
- $_SESSION["login_error_msg"] = 'OIDC: ' . $e->getMessage();
- return false;
- }
- }
-
- return true;
- }
-
function get_login_js() {
return file_get_contents(__DIR__ . "/init.js");
}