Hi Marko, Not that I know of. I have considered making a CAS library for node though, as I have a fair amount of experience with node now. Unfortunately, we don't use node at work, so it would have to be done on my own time.
But, implementing a simple authentication with CAS is quite trivial. It's just a matter of... 1. Taking the url just requested 2. Separate the ticket parameter from the url 3. pass the url to https://yourcas.host/cas/serviceValidate?service=urlencoded-service-url&ticket=the-ticket 4. parse the resulting XML to obtain the user. An example is in the validate_cas_ticket sub in my cascli https://github.com/AthabascaUniversity/cas-cli/blob/master/cas-cli.pl along with the getCasUser sub for parsing the xml. The xpath for obtaining the user is... /cas:serviceResponse/cas:authenticationSuccess/cas:user/text() If you want to get more complicated and go for SAML, there's an example in there for that too. I do wish I had just used nodejs to build that, as I'm not really a perl programmer. 😄 p.s. Use the fetch api, it's much easier that way! There are limitations to fetch though. Thanks. [https://avatars3.githubusercontent.com/u/3911606?s=400&v=4]<https://github.com/AthabascaUniversity/cas-cli/blob/master/cas-cli.pl> AthabascaUniversity/cas-cli<https://github.com/AthabascaUniversity/cas-cli/blob/master/cas-cli.pl> CAS command line application for testing cas. Contribute to AthabascaUniversity/cas-cli development by creating an account on GitHub. github.com ________________________________ From: [email protected] <[email protected]> on behalf of Marko Bera <[email protected]> Sent: February 21, 2019 6:50 PM To: [email protected] Subject: [cas-dev] CAS and node.js 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. Thanks in advance! -- 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]<mailto:[email protected]>. Visit this group at https://groups.google.com/a/apereo.org/group/cas-dev/. -- This communication is intended for the use of the recipient to whom it is addressed, and may contain confidential, personal, and or privileged information. Please contact us immediately if you are not the intended recipient of this communication, and do not copy, distribute, or take action relying on it. Any communications received in error, or subsequent reply, should be deleted or destroyed. --- -- 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/.
