kayleecodes1 / cas-authentication

A CAS authentication library designed to be used as middleware for an Express server.
MIT License
73 stars 77 forks source link

Is there any special configuration required on CAS server side? #9

Closed orphee2633 closed 7 years ago

orphee2633 commented 8 years ago

Good morning

Im receiving a null on index.js (on cas-authentication) on line 77 when bounce returns to service url, i can succesfully login into my cas server, but when the 'cas.bounce' method redirects to my service url, i receive this error.

[TypeError: Cannot read property 'serviceresponse' of null] [Error: CAS authentication failed.]

i tracked down the cause and turns out 'result' variable on index.js line 77 is null. I think the problem is a misconfiguration on the CAS server side, thats why im asking for any required configuration.

Thanks in advance.

Additional details: Central Authentication System (CAS) 3.6.0, running on apache tomcat 7.0.57

Epictek commented 8 years ago

I'm also trying to use this and getting the same error so would interested if this is the problem.

Epictek commented 8 years ago

Emailed the university and they told me I wasn't allowed to do that. Don't know if this helps you sorry.

lin04com commented 8 years ago

anyone can help? i got the same error...

M3lkior commented 7 years ago

Hello,

Try to change cas_version property to saml1.1 :

// Create a new instance of CASAuthentication.
var cas = new CASAuthentication({
    cas_url     : 'https://your_cas_url/cas',
    service_url : `http://localhost:${process.env.PORT || 3000}`,
    cas_version: "saml1.1"
});
kayleecodes1 commented 7 years ago

@orphee2633 @Epictek Did you guys ever figure this out? The question might be more of a CAS setup problem than a problem with the library but I'd like to figure out if it could possibly be the latter.

kayleecodes1 commented 7 years ago

I'm closing this for now as it seems to be a configuration problem. Do let me know if you think there is a legitimate bug associated with this.