From c4c64c2b83d49411ee5997000868874d5621e0dd Mon Sep 17 00:00:00 2001 From: Erik Tryggvason Date: Tue, 12 Dec 2023 14:13:56 -0800 Subject: [PATCH] add $config['CAS_BASEURL'] as 5th arg when calling $cas->client(); --- backend/AUTH/methode/cas.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/backend/AUTH/methode/cas.php b/backend/AUTH/methode/cas.php index 6aa906d7f..585b03220 100755 --- a/backend/AUTH/methode/cas.php +++ b/backend/AUTH/methode/cas.php @@ -37,15 +37,19 @@ function get_cas_config() { $config = get_cas_config(); $cas = new phpCas(); + // Enable debugging $cas->setLogger(); + // Enable verbose error messages. Disable in production $cas->setVerbose(true); if (!isset($sql_update)) { - $cas->client(CAS_VERSION_2_0, $config['CAS_HOST'], (int)$config['CAS_PORT'], $config['CAS_URI']); - // Set Service URL - // required if operating behind a load balancer or reverse proxy. + // phpCAS 1.6.0 and newer require passing $client_service_name as 5th arg - implemented here as CAS_BASEURL. + $cas->client(CAS_VERSION_2_0, $config['CAS_HOST'], (int)$config['CAS_PORT'], $config['CAS_URI'], $config['CAS_BASEURL']); + + // Set Service URL - required if operating behind a load balancer or reverse proxy. + // Note: might not be required for phpCAS 1.6.0 and newer if (!isset($config['CAS_BASEURL'])) { $cas->setFixedServiceURL($config['CAS_BASEURL']); }