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

Access service application always redirect cas #4

Open Delvius opened 8 years ago

Delvius commented 8 years ago

Hi, i have a trouble with this plugin. My application always redirect me to the cas authentication page (at the first connection) even if i already have a cas ticket.

My config :

var cas = new CASAuthentication({ cas_url : 'XXXX', service_url : 'XXXX', cas_version : '3.0', renew : false, is_dev_mode : false, dev_mode_user : '', dev_mode_info : {}, session_name : 'cas_user', session_info : 'cas_userinfo', destroy_session : false

});

app.get('/',cas.bounce_redirect, controllers.index);

Any ideas ?

matthewvalimaki commented 8 years ago

@Delvius per official CAS protocol documentation https://jasig.github.io/cas/development/protocol/CAS-Protocol-Specification.html#parameters:

renew [OPTIONAL] - if this parameter is set, single sign-on will be bypassed. In this case, CAS will require the client to present credentials regardless of the existence of a single sign-on session with CAS.

Many comments around the nets suggest that "renew=false" could be used. Either protocol has changed or implementation has been broken. Either way cas-authentication should not add it to the request unless something else than false.

matthewvalimaki commented 8 years ago

@Delvius I've forked and published my version if you want to give it a try. See https://www.npmjs.com/package/r-cas-authentication.

sharumpe commented 8 years ago

I'm glad I looked -- I was going to create a similar pull request for this. Thought it was just my CAS configuration or something.

dgeo commented 7 years ago

@matthewvalimaki thank you !

@kylepixel thank you for sharing at first ! now: pass the hand or support ?

kayleecodes1 commented 7 years ago

Hey, all! I've been pretty inactive on my Github projects recently. I originally published this to NPM to quickly get it into our application at my job but I'm planning on revisiting this and handling all of the requests / pull requests. Sorry about that.