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/auth_plugins/StudipAuthCAS.class.php | |
| parent | 9edc732da96a28bdd2e325ea820c5f9e3bbe6419 (diff) | |
initial draft of update to phpCAS 1.6, fixes #1844biest-1844
Diffstat (limited to 'lib/classes/auth_plugins/StudipAuthCAS.class.php')
| -rw-r--r-- | lib/classes/auth_plugins/StudipAuthCAS.class.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/classes/auth_plugins/StudipAuthCAS.class.php b/lib/classes/auth_plugins/StudipAuthCAS.class.php index 29deb75..06f3180 100644 --- a/lib/classes/auth_plugins/StudipAuthCAS.class.php +++ b/lib/classes/auth_plugins/StudipAuthCAS.class.php @@ -8,6 +8,7 @@ */ require_once 'lib/classes/cas/CAS_PGTStorage_Cache.php'; +require_once 'lib/classes/cas/CAS_ServiceBaseUrl_Studip.php'; class StudipAuthCAS extends StudipAuthSSO { @@ -31,13 +32,15 @@ class StudipAuthCAS extends StudipAuthSSO $this->login_description = _('für Single Sign On mit CAS'); } if (Request::get('sso') === $this->plugin_name) { + $base_url = new CAS_ServiceBaseUrl_Studip(); + if ($this->proxy) { URLHelper::setBaseUrl($GLOBALS['ABSOLUTE_URI_STUDIP']); - phpCAS::proxy(CAS_VERSION_2_0, $this->host, $this->port, $this->uri, false); + phpCAS::proxy(CAS_VERSION_2_0, $this->host, $this->port, $this->uri, $base_url, false); phpCAS::setPGTStorage(new CAS_PGTStorage_Cache(phpCAS::getCasClient())); phpCAS::setFixedCallbackURL(URLHelper::getURL('dispatch.php/cas/proxy')); } else { - phpCAS::client(CAS_VERSION_2_0, $this->host, $this->port, $this->uri, false); + phpCAS::client(CAS_VERSION_2_0, $this->host, $this->port, $this->uri, $base_url, false); } if (isset($this->cacert)) { @@ -83,7 +86,8 @@ class StudipAuthCAS extends StudipAuthSSO function logout() { // do a global cas logout - phpCAS::client(CAS_VERSION_2_0, $this->host, $this->port, $this->uri, false); + $base_url = new CAS_ServiceBaseUrl_Studip(); + phpCAS::client(CAS_VERSION_2_0, $this->host, $this->port, $this->uri, $base_url, false); phpCAS::logout(); } } |
