summaryrefslogtreecommitdiffstats
path: root/library/nagvis-includes/CoreLogonIcingaweb2.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:45:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:45:29 +0000
commit0fa6f7723cca9bf7edc8af84112e8429e82dea84 (patch)
tree52c73718c9e2b6e4aa3f997791786aa2ee6ebcc9 /library/nagvis-includes/CoreLogonIcingaweb2.php
parentInitial commit. (diff)
downloadicingaweb2-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.php22
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;
+ }
+ }
+}