diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:45:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:45:29 +0000 |
commit | 0fa6f7723cca9bf7edc8af84112e8429e82dea84 (patch) | |
tree | 52c73718c9e2b6e4aa3f997791786aa2ee6ebcc9 /library/nagvis-includes/CoreLogonIcingaweb2.php | |
parent | Initial commit. (diff) | |
download | icingaweb2-module-nagvis-upstream.tar.xz icingaweb2-module-nagvis-upstream.zip |
Adding upstream version 1.1.1.upstream/1.1.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library/nagvis-includes/CoreLogonIcingaweb2.php')
-rw-r--r-- | library/nagvis-includes/CoreLogonIcingaweb2.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/library/nagvis-includes/CoreLogonIcingaweb2.php b/library/nagvis-includes/CoreLogonIcingaweb2.php new file mode 100644 index 0000000..4602bba --- /dev/null +++ b/library/nagvis-includes/CoreLogonIcingaweb2.php @@ -0,0 +1,22 @@ +<?php + +class CoreLogonIcingaweb2 extends CoreLogonModule +{ + public function check($printErr = true) + { + global $AUTH, $CORE; + if ($AUTH->isAuthenticated()) { + $AUTH->setTrustUsername(true); + $AUTH->setLogoutPossible(false); + return true; + } else { + // ??? ... + die('not authenticated'); + // ... + header('Location: /icingaweb'); + exit; + // ... ??? + return false; + } + } +} |