CAS Authentication with Moodle Not Working

CAS Authentication with Moodle Not Working

by Matthew Koelling -
Number of replies: 5

Hi All.

I am new to Moodle support and I have a couple questions. I am trying to set up moodle to use CAS Authentication on the following version of Moodle (1.98) and I get the following error:

Warning: DOMDocument::loadXML() [function.DOMDocument-loadXML]: Start tag expected, '<' not found in Entity, line: 1 in /moodle-fs/lms/public_html/auth/cas/CAS/CAS/domxml-php4-to-php5.php on line 72

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.


phpCAS 1.1.0 using server https://cas-dev.humboldt.edu:8443/cas/login/ (CAS 2)
 

I have gone through the documentation on the forums and I have tried several things suggested but havn't found a solution to the problem. Do I need to enable LDAP authentication as well or do I need to import all the users first?

Thank you for any help.

Average of ratings: -
In reply to Matthew Koelling

Re: CAS Authentication with Moodle Not Working

by Tomasz Rybicki -

Hi, 

I had the same thing. In my case, the problem was in incorrect configuration of the CAS auth plugin. My CAS serwer was 

https://something.sth.pl/cas/login

What needed to be entered in CAS auth plugin conf is:

hostname: something.sth.pl 
base uri:  cas/

Note that I omitted 'https://' and '/login' parts. This is because they are added (apparently) by Moodle. 

In your case, I'd suggest using:

hostname = cas-dev.humboldt.edu:8443 
base uri= cas/  

 

Average of ratings: Useful (1)
In reply to Tomasz Rybicki

Re: CAS Authentication with Moodle Not Working

by Matthew Koelling -

Thank you so much!!! That did the trick I had the base uri set to cas/login.

After setting it to cas/ it logged in fine.

The hostname didn't need the port added.

Thank you so much for the help, I have been messing with this for almost two weeks!

In reply to Matthew Koelling

回复: Re: CAS Authentication with Moodle Not Working

by 念杰 韦 -

Had anybody solved the problem?

CAS Authentication failed

In reply to 念杰 韦

回复: Re: CAS Authentication with Moodle Not Working

by 念杰 韦 -

Yeah! I have found the errors.

When set the cas_host as 'cas.com' in moodle's cas config.You must make sure that brownser,client,server could analysis it. Or you can use IP instead

In reply to Matthew Koelling

Re: CAS Authentication with Moodle Not Working

by Ильгизар Гайнутдинов -

hi to all!I want to customize sso between the two sites non-Moodle and Moodle,
user after authorizing in non-Moodle work Moodle
cas-server allows to do this?
write, pls, how to do it, step by step