0

I have developed a .Net MVC application that use OWIN library for authentication. How can I integrate my Code with Rocket.chat? Is there any RC library that support OWIN inside NodeJS Code?

  • Since NodeJS is a JavaScript runtime engine and OWIN is a .Net only technology this would be very hard to do in a performant way. These are very different animals and I think it's a bad idea to try to integrate them – bikeman868 May 12 '17 at 06:51
  • @bikeman868 regardless of the stack, it's still a cookie, integration must be possible. MVC is built on standard http principles this is definitely possible. – Aran Mulholland Sep 19 '17 at 13:22
  • The difficult areas are not in the messages that go over the wire, they are in what happens on the back end. Cookies are just data stored on the browser and all stacks can see the cookies, but interpreting the contents of the cookie is a hard problem. For example if .Net is using the machine key for encryption from the .Net configuration files then NodeJS would need to understand how these config files work to retrieve the same key and decrypt the data. I didn't say that integration was impossible, just sufficiently problematic that I think it's a bad idea. – bikeman868 Sep 19 '17 at 15:40
  • @bikeman868 Cookies can be have a custom encryption scheme. Sometimes sharing them may have to be done. I am working on a project where there is no option to have the very specialised code that is written in R and Java be rewritten in .net. Not to mention the costs that this would involve. We run a platform across multiple servers and as most of our services are .net based we use .net for authentication. Comments that are basically "this is hard, do something else" are worth nothing compared to an answer of how you would solve the problem (which may involve a different form of authentication). – Aran Mulholland Sep 20 '17 at 14:15
  • @bikeman868 seen this? https://www.npmjs.com/package/aspxauth Or this? https://stackoverflow.com/questions/34882672/how-to-decrypt-cookie-with-nodejs - people who have overcome difficulty and DONE it. – Aran Mulholland Sep 20 '17 at 14:19
  • I started programming in the days when hard was the only option. I have successfully DONE many very hard programming challenges and that's fine if you are just trying to find something challenging to push yourself, but if Abu Qassem is doing this on someone else's dime then there is almost certainly a better way. Comments of "this is really hard find another option" are extremely helpful if it stops someone wasting months of effort because they didn't realize at the outset how hard this was going to be. – bikeman868 Sep 21 '17 at 05:48

0 Answers0