aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/auth_plugins/StudipAuthAbstract.class.php
diff options
context:
space:
mode:
authorMichaela Brückner <brueckner@data-quest.de>2024-01-02 08:32:34 +0000
committerMichaela Brückner <brueckner@data-quest.de>2024-01-02 08:32:34 +0000
commitb6bdba58a8e090cb144bae382457c2e439d8a72a (patch)
tree39cf8613a72a27eef0caafce856e6ff6e9a7f474 /lib/classes/auth_plugins/StudipAuthAbstract.class.php
parent89170f146eaab82fa59069a310e25355399e7b7d (diff)
Step 2660 closes #2660
Closes #2660 Merge request studip/studip!2124
Diffstat (limited to 'lib/classes/auth_plugins/StudipAuthAbstract.class.php')
-rw-r--r--lib/classes/auth_plugins/StudipAuthAbstract.class.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/lib/classes/auth_plugins/StudipAuthAbstract.class.php b/lib/classes/auth_plugins/StudipAuthAbstract.class.php
index d1bcfac..fd2d4e9 100644
--- a/lib/classes/auth_plugins/StudipAuthAbstract.class.php
+++ b/lib/classes/auth_plugins/StudipAuthAbstract.class.php
@@ -91,6 +91,14 @@ class StudipAuthAbstract
public $error_head;
/**
+ * toggles display of standard login
+ *
+ *
+ * @var bool $show_login
+ */
+ public $show_login;
+
+ /**
* @var $plugin_instances
*/
private static $plugin_instances;
@@ -121,6 +129,38 @@ class StudipAuthAbstract
}
/**
+ * static method to check if SSO login is enabled
+ *
+ * @return bool
+ */
+ public static function isSSOEnabled(): bool
+ {
+ self::getInstance();
+ foreach (self::$plugin_instances as $auth_plugin) {
+ if ($auth_plugin instanceof StudipAuthSSO) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * static method to check if standard login is enabled
+ *
+ * @return bool
+ */
+ public static function isLoginEnabled(): bool
+ {
+ self::getInstance();
+ foreach (self::$plugin_instances as $auth_plugin) {
+ if ($auth_plugin->show_login === true) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
* static method to check authentication in all plugins
*
* if authentication fails in one plugin, the error message is stored and the next plugin is used