Hi,
I am trying to setup CAS for Moodle 2.8 with CAS Server 4.0.0. I am getting exactly same error and have no clue whats going wrong as I don't see anything from Apache and Tomcat logs. It is probably a certificate issue according to another thread but I don't see any evidence as I am successfully redirected to CAS but when CAS generates a ticket and redirects to Moodle I get below error.
Moodle is configured on lms28.teletaaleem.com and CAS configuration is as below,
Hostname: labs14.teletaaleem.com
BaseURI: cas-server-webapp-4.0.0/
Port:8443
CAS Sever is configured on labs14.teletaaleem.com:8443/cas-server-webapp-4.0.0/ and cas.properties looks like:
server.name=https://labs14.teletaaleem.com:8443
server.prefix=${server.name}/cas-server-webapp-4.0.0
host.name=labs14.teletaaleem.com
I used Java Keystore created using keytool to enable SSL in tomcat.
Now After enabling DEBUG I only see below info.
Error
Debug info:
Error code: generalexceptionmessage
- line 3124 of /auth/cas/CAS/CAS/Client.php: CAS_AuthenticationException thrown
- line 1409 of /auth/cas/CAS/CAS/Client.php: call to CAS_Client->validateCAS20()
- line 1296 of /auth/cas/CAS/CAS/Client.php: call to CAS_Client->isAuthenticated()
- line 995 of /auth/cas/CAS/CAS.php: call to CAS_Client->checkAuthentication()
- line 143 of /auth/cas/auth.php: call to phpCAS::checkAuthentication()
- line 89 of /login/index.php: call to auth_plugin_cas->loginpage_hook()
Below log from Tomcat shows the TGT-Ticket was created and issued to Moodle.
2015-05-12 17:23:19,651 INFO [org.jasig.cas.CentralAuthenticationServiceImpl] - <Granted service ticket [ST-7-4K0GqsB6jC0EB2wlAOfy-labs14.teletaaleem.com] for service [http://lms28.teletaaleem.com/login/index.php] for user [tasawar]>
2015-05-12 17:23:19,652 INFO [com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit trail record BEGIN
=============================================================
WHO: tasawar
WHAT: ST-7-4K0GqsB6jC0EB2wlAOfy-labs14.teletaaleem.com for http://lms28.teletaaleem.com/login/index.php
ACTION: SERVICE_TICKET_CREATED
APPLICATION: CAS
WHEN: Tue May 12 17:23:19 PKT 2015
CLIENT IP ADDRESS: 110.22.61.69
SERVER IP ADDRESS: 172.31.21.125
=============================================================