XavRsl / Cas

CAS server SSO authentication in Laravel 4.x & 5.x
MIT License
77 stars 36 forks source link

Cas::getCurrentUser() Exception #12

Open rfiedler opened 9 years ago

rfiedler commented 9 years ago

Hi Xavier ! Can you help me ?

I will describe the context of what is happening;

1- I access first page os system and do login laravel1

2- Login redirect to cas server and authentication is ok, return to application laravel2

3- Cas send ticket via GET but raise exception when getCurrentUser is called laravel3

Route, Filter and Controller informations :

Routes laravel4

Filters laravel5

Controller laravel6

PS: Using the "simple example" of jasig PHPcas everythings is ok ..... cas return ticket and i can getCurrentUser.... Whats happen with laravel ?

Thank you for your attention

XavRsl commented 9 years ago

Hi, It seems weird to have 'CASAuthServer' suffix in your ticket. I don't really know where that comes from... Your code seams alright. And if it works with the Jasig package, it's even weirder... Do you see that 'CASAuthServer' string in your URL as well when you're using the Jasig package ?

Xavier

jmandrade commented 9 years ago

Same error here. Works OK without "ca", doesn't work with. I think "ufscCASAuthServer" is actually the server name (I get a different string there).

In my case the error seems to happen on "Cas::authenticate();"

XavRsl commented 9 years ago

Is your application using https protocol ? If you're using ca to authenticate the server, you will need to do it over https.

Xavier

2015-02-10 19:55 GMT+01:00 Jose Andrade notifications@github.com:

Same error here. Works OK without "ca", doesn't work with. I think "ufscCASAuthServer" is actually the server name (I get a different string there).

In my case the error seems to happen on "Cas::authenticate();"

— Reply to this email directly or view it on GitHub https://github.com/XavRsl/Cas/issues/12#issuecomment-73759460.

Xavier

jmandrade commented 9 years ago

(edited) I was wrong. It does not work on the production server. Could it be because the server has a self-signed certificate? Does it need to be a CA certificate on the application server and also the CAS server?