Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ErrorException DOMDocument::loadXML() with Cas login and redirect in laravel5 #24

Open
danhe opened this issue Jul 20, 2015 · 1 comment

Comments

@danhe
Copy link

danhe commented Jul 20, 2015

Hello,
I have some problems with cas login, now i can get the page of login with cas, but when i click the button login, i meet some problems:
ErrorException in Client.php line 3137: DOMDocument::loadXML(): Space required after the Public Identifier in Entity, line: 1
at HandleExceptions->handleError('2', 'DOMDocument::loadXML(): Space required after the Public Identifier in Entity, line: 1', '/var/www/html/private/vendor/jasig/phpcas/source/CAS/Client.php', '3137', array('validate_url' => 'https://login.unice.fr/serviceValidate?service=http%3A%2F%2Flocalhost%2Fprivate%2Fpublic%2Flogin&ticket=ST-1903829-FIC9heJrTXUTsXqF7qTc-login.unice.fr', 'text_response' => ' <title>302 Found</title>

Found

The document has moved here.

', 'tree_response' => null, 'result' => false, 'headers' => array('HTTP/1.1 302 Found ', 'Date: Mon, 20 Jul 2015 13:03:24 GMT ', 'Server: Apache ', 'Location: https://login.unice.fr/loginserviceValidate?service=http%3A%2F%2Flocalhost%2Fprivate%2Fpublic%2Flogin&ticket=ST-1903829-FIC9heJrTXUTsXqF7qTc-login.unice.fr ', 'Content-Length: 343 ', 'Connection: close ', 'Content-Type: text/html; charset=iso-8859-1 ', ' '), 'err_msg' => '', 'this' => object(CAS_Client), 'dom' => object(DOMDocument)))

I don't know how to resolve it , and after that i cann't get the informations of the user with Cas::user() or Cas::getCurrentUser(), i need your help , thanks..

@XavRsl
Copy link
Owner

XavRsl commented Jul 22, 2015

Hard to tell... There seems to be a problem in your config. The location of the serviceValidate URL in your exemple seems to be wrong (loginserviceValidate instead of serviceValidate). And, your service is a localhost, which could represent a validation problem (I don't know about Nice University, but here in Versailles, we allow only domain specific URLs). And, your URL includes "public", which should not be used as is in Laravel, but should be re-written by your HTTP server.
Could you also use the "code syntax" in the github editor so that the code is easier to read ?
Hope this helps....

Xavier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants