diff options
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; + } + } +} |