CAS Authentication failed! while using ohocas client

1.6k views Asked by At

I've setup the rubycas-server with mysql backend. But when i tried to login via a phpCAS client, it is redirected to rubycas-server url. but, after entering username & password - I got this error

CAS Authentication failed!

You were not authenticated.

You may submit your request again by clicking here.

If the problem persists, you may contact the administrator of this site.

CAn u tell me...whats wrong with my phpcas client..Please help me.

2

There are 2 answers

0
Mohammad Azhar On

This is the problem which generally comes with the development servers when we use no SSL::setNoCasServerValidation(); However even after using setNoCasServerValidation(), the CAS Client internally calls the curl using https, which is the main cause of this error.

So to fix it just go to CAS Library file ../CAS/CAS/Client.php Reach the function

private function _readURL($url, &$headers, &$body, &$err_msg){}

and add this line

$url = str_replace("https", "http", $url);

as the first line of function _readURL(...

Please don't do this in production environment as CAS recommends use of SSL on production.

0
coder On

Updating the certificate on the CAS server solved the problem for me.