CAS authentication attempt fails with generalexceptionerror

Re: CAS authentication attempt fails with generalexceptionerror

by haris zacharatos -
Number of replies: 0

Hi, Did you finaly solve the issue? 

I have the same problem. When i dig in to code i found out that is failing on the _readURL function in Client.php file. 

As you can see above is reading the url correctly, is populating the curl_options, but when the request->send() is called is returning null (going into else section), so its failing. 

Any ideas why this is happening?

Appreciate any help

Haris


Stack trace:

  • line 3166 of /auth/cas/CAS/CAS/Client.php: CAS_AuthenticationException thrown
  • line 1417 of /auth/cas/CAS/CAS/Client.php: call to CAS_Client->validateCAS20()
  • line 1300 of /auth/cas/CAS/CAS/Client.php: call to CAS_Client->isAuthenticated()
  • line 1060 of /auth/cas/CAS/CAS.php: call to CAS_Client->checkAuthentication()
  • line 153 of /auth/cas/auth.php: call to phpCAS::checkAuthentication()
  • line 90 of /login/index.php: call to auth_plugin_cas->loginpage_hook()
Output buffer: URL:https://login.pi.ac.cy/serviceValidate?service=http%3A%2F%2F10.10.10.212%2Fmoodle%2Flogin%2Findex.php%3FauthCAS%3DCAS&ticket=ST-717-VLYaGPhgW7179JNiTCLh-casREQUESTCAS_Request_CurlRequest Object ( [_curlOptions:CAS_Request_CurlRequest:private] => Array ( [32] => 3 ) [url:protected] => https://login.pi.ac.cy/serviceValidate?service=http%3A%2F%2F10.10.10.212%2Fmoodle%2Flogin%2Findex.php%3FauthCAS%3DCAS&ticket=ST-717-VLYaGPhgW7179JNiTCLh-cas [cookies:protected] => Array egg [headers:protected] => Array egg [isPost:protected] => [postBody:protected] => [caCertPath:protected] => [validateCN:protected] => 1 [_sent:CAS_Request_AbstractRequest:private] => [_responseHeaders:CAS_Request_AbstractRequest:private] => Array egg [_responseBody:CAS_Request_AbstractRequest:private] => [_errorMessage:CAS_Request_AbstractRequest:private] => )

Function that is failing :

if ($request->send()) {

            echo 'I AM HERE';

            $headers = $request->getResponseHeaders();

            $body = $request->getResponseBody();

            $err_msg = '';

            phpCAS::traceEnd(true);

            return true;

        } else {

            echo 'I AM THERE';

            $headers = '';

            $body = '';

            $err_msg = $request->getErrorMessage();

            phpCAS::traceEnd(false);

            return false;

        }