diff options
| author | Elmar Ludwig <elmar.ludwig@uni-osnabrueck.de> | 2022-12-02 16:34:19 +0100 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2023-03-28 14:18:28 +0200 |
| commit | b86d479bdc13a1cce1139c600f98f53cb702eb4c (patch) | |
| tree | 294fb8107f65da93a323e5d3862a4fba2c2a6f8b /lib/classes/cas | |
| parent | 9edc732da96a28bdd2e325ea820c5f9e3bbe6419 (diff) | |
initial draft of update to phpCAS 1.6, fixes #1844biest-1844
Diffstat (limited to 'lib/classes/cas')
| -rw-r--r-- | lib/classes/cas/CAS_ServiceBaseUrl_Studip.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/classes/cas/CAS_ServiceBaseUrl_Studip.php b/lib/classes/cas/CAS_ServiceBaseUrl_Studip.php new file mode 100644 index 0000000..0634e44 --- /dev/null +++ b/lib/classes/cas/CAS_ServiceBaseUrl_Studip.php @@ -0,0 +1,15 @@ +<?php + +class CAS_ServiceBaseUrl_Studip extends CAS_ServiceBaseUrl_AllowedListDiscovery +{ + public function __construct() + { + $protocol = $this->isHttps() ? 'https' : 'http'; + $allow_list = array_map(function($host) use ($protocol) { + $host = preg_replace('/\/.*/', '', $host); + return $protocol . '://' . $host; + }, $GLOBALS['STUDIP_DOMAINS'] ?? []); + + parent::__construct($allow_list); + } +} |
