Support » Plugin: CAS Maestro » CAS Authentication Failed

  • Mostly just putting this here for anyone who might run into this issue, when we first started using this plugin we’d get the following error when attempting to login:

    Fatal error: Uncaught exception ‘CAS_AuthenticationException’ in /wp-content/plugins/cas-maestro/phpCAS/CAS/Client.php:2764 Stack trace: #0 /wp-content/plugins/cas-maestro/phpCAS/CAS/Client.php(1224): CAS_Client->validateCAS20(‘…’, ”, NULL) #1 /wp-content/plugins/cas-maestro/phpCAS/CAS/Client.php(1083): CAS_Client->isAuthenticated() #2 /wp-content/plugins/cas-maestro/phpCAS/CAS.php(1101): CAS_Client->forceAuthentication() #3 /wp-content/plugins/cas-maestro/cas-maestro.php(227): phpCAS::forceAuthentication() #4 [internal function]: CAS_Maestro->validate_login(Object(WP_Error), ”, ”) #5 /wp-includes/plugin.php(192): call_user_func_array(Array, Array) #6 /wp-includes/pluggable.php(537): apply_filters(‘authenticate’, NULL, ”, ”) #7 /wp-includes/user.php in /wp-content/plugins/cas-maestro/phpCAS/CAS/Client.php on line 2764

    To resolve this error we had to add curl_setopt($ch, CURLOPT_SSLVERSION,3); to phpCAS/CAS/Request/CurlRequest.php where the SSL configuration is set (currently line 125 and 130.

    I’m sure this is specific to how the SSL certs are handled on our CAS server but just in case anyone else happens to get the same error I thought I’d post it here.

Viewing 8 replies - 1 through 8 (of 8 total)
  • If it’s helpful, I had the same issue. It was sending a non-SSL service to CAS and CAS sent back to validation by http:// … :443 , so non-SSL on port 443, which caused Apache to error and CAS to not get the ticket validation. The issue seems to stem from the implementation of phpCAS. I managed to fix it with a hack on cas-mastro/phpCAS/CAS/Client.php on line 3055: $final_uri = ‘https’; The getURL() for some reason wasn’t adding https even with the login.php being forced over SSL. I’ve never seen this issue with phpCAS before, but SSL should generally be used for logins, even to secured CAS, so that the session cookie value isn’t grabbed.

    Plugin Author Henrique Mouta


    I really can’t understand if this is a phpCAS issue…
    Can you email me your CAS settings just to see if there is anything that we didn’t think of?

    My email is

    I add curl_setopt($ch, CURLOPT_SSLVERSION,3); to phpCAS/CAS/Request/CurlRequest.php ,but the error still exits ! When in the same system , it can success .

    Fatal error: Uncaught exception ‘CAS_AuthenticationException’ in /usr/local/apache/htdocs/cas/CAS/Client.php:2764 Stack trace: #0 /usr/local/apache/htdocs/cas/CAS/Client.php(1224): CAS_Client->validateCAS20(‘https://lwx2615…’, ”, NULL) #1 /usr/local/apache/htdocs/cas/CAS/Client.php(1083): CAS_Client->isAuthenticated() #2 /usr/local/apache/htdocs/cas/CAS.php(1101): CAS_Client->forceAuthentication() #3 /usr/local/apache/htdocs/cas/docs/examples/example_html.php(58): phpCAS::forceAuthentication() #4 {main} thrown in /usr/local/apache/htdocs/cas/CAS/Client.php on line 2764

    in the phpCAS.log :
    10054 5A70 .| | | | | => CAS_Request_CurlRequest::sendRequest() [A bstractRequest.php:220] 10055 5A70 .| | | | | | CURL: Set CURLOPT_CAINFO /root/client-p ublic.cer [CurlRequest.php:128]
    10056 5A70 .| | | | | | curl_exec() failed [CurlRequest.php:77]
    10057 5A70 .| | | | | <= false
    10058 5A70 .| | | | <= false 10059 5A70 .| | | | could not open URL

    Plugin Author Henrique Mouta


    That is really strange…
    Can you please email me your CAS settings to my email?


    For what it’s worth, on the SSL handshake issue, I found it was caused by a recent openssl patch in the wake of POODLE that caused the running mod_ssl to be outdated with the server openssl. A restart of Apache fixed it.

    Also, my https redirect issue appears to be offtopic and hasn’t been an issue in the most recent update.

    I had this issue, and it turned out my firewall was blocking the outgoing connection to the SSO server. Added an exception for that host, and CAS Maestro can now see the SSO server.

    Whenever members signup and attempt to login using their user generated username and password my script responds with Authentication failed. It is my understanding that this is usually caused by a incorrect GWpass in the script but I’m not sure how to correct. The site is currently using WP 3.85

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘CAS Authentication Failed’ is closed to new replies.