user_cas
user_cas copied to clipboard
Allow http-only, to better support mock CAS servers
For local development I am using a mock server for CAS.
It is much easier to set this up with http instead of https.
However, user_cas and phpCAS assume that the CAS server always uses https.
For development purposes it would be nice to allow http-only.
And I want to point out there is a difference of http protocol for the CAS server, vs for Nextcloud.
Btw, I considered to open this issue in https://github.com/apereo/phpCAS. But we are not even using the latest version of that, so I couldn't tell if this is not already working in latest phpCAS.
Modify the places where 'https://' is used for string concatenation in the vendor/jasig/phpcas/source/CAS/Client.php file. There are two places:
Line 339 $this->_server['base_url'] = 'https://' . $this->_getServerHostname();
Line 2581 $final_uri = 'https://';
Change the https used for concatenation in the above two codes to http.