WordPress.org

Ready to get started?Download WordPress

Forums

CAS Maestro
CAS Authentication Failed (5 posts)

  1. timmmmyboy
    Member
    Posted 2 months ago #

    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('https://auth.um...', '', 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.

    https://wordpress.org/plugins/cas-maestro/

  2. vwbusguy
    Member
    Posted 2 months ago #

    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.

  3. Henrique Mouta
    Member
    Plugin Author

    Posted 1 month ago #

    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 henrique@mowta.pt

  4. lwx
    Member
    Posted 1 month ago #

    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

  5. Henrique Mouta
    Member
    Plugin Author

    Posted 1 month ago #

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

    Thanks!
    Henrique

Reply

You must log in to post.

About this Plugin

About this Topic

Tags