On 22/02/2019 02:50, Marko Bera wrote:
Hi, guys!

I was thinking about learning Node as backend language through a college 
project that requires CAS implementation, so I am wandering if there are any 
node implementations of newer versions of CAS that work 100% well?
Any advice or some kind of materials on this subject would be really helpful.

Hi,

I use https://github.com/AceMetrix/connect-cas which is quite nice. With a few 
workarounds:

- I usually have http apps behind a https reverse proxy, and express "trust 
proxy" is not enough ( http://expressjs.com/en/guide/behind-proxies.html ).
I use a express middleware which sets req.headers.host, cf 
https://github.com/UnivParis1/esup-restdb/blob/master/api/utils.js#L10-L25

- connect-cas "ssout" for single logout requires a service url which can be too 
restrictive.
I use https://github.com/UnivParis1/esup-restdb/blob/master/api/cas-ssout.js

- it seems connect-cas is meant to be used with redis sessionStore. If you use 
"session-file-store", it will log wrong warnings.
Solution: use option session-file-store option retries: 0: it will give up on 
unknown sessions without retrying. In most use cases (local filesystem), 
retrying is useless.
(cf 
https://stackoverflow.com/questions/31387999/nodejs-enoent-warning-messages-with-sessions#comment95058334_31394560
 )

cu

--
You received this message because you are subscribed to the Google Groups "CAS 
Developer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/a/apereo.org/group/cas-dev/.

Reply via email to