Authentication problems using CAS and external database

Authentication problems using CAS and external database

by Gary Morgan -
Number of replies: 1
Hello, I've got a problem with authentication.  I've just upgraded my site from 2.4 to 2.7.9, and the authentication plugin has been broken as a result.  I think the plugin is custom-built, it logs in to a Drupal user table using CAS but instead of using LDAP, it uses the normal external database connection, so it's a combination of the CAS plugin and the DB plugin.

It works fine when I log in as an administrator that's already in the database.  If the user isn't already in there, it adds the user to the Moodle users table, but with a . and 10 numbers after it.  The email seems to be encoded as numbers and letters.  There is an error message:

---

CAS Authentication failed!

You were not authenticated.

You may submit your request again by clicking here [link to login page].

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


phpCAS 1.3.3 using server [CAS web address]/cas/ (CAS 2.0)

Exception -

More information about this error

---

If I click on 'You may submit your request again by clicking here', the database is updated with the correct username and email, and I'm logged in OK. 

Any ideas on what might be happening?  I've updated the custom plugin with the appropriate code from the current CAS and DB plugins but still getting this problem.

Many thanks.
Average of ratings: -
In reply to Gary Morgan

Re: Authentication problems using CAS and external database

by Gary Morgan -

Wondering if anyone has any ideas on this.  I've got a test version of the website which works successfully, and the live version with the same code doesn't.