Nodejs - User authentication - linux

I've been wrote a WebAPI service with nodejs and MongoDB, it works great.
The WebAPI service running over linux.
I want the Node service to know the user ID for each request.(The network is Intranet)
I want to use the windows integrate authentication
how can i get the windows userId in the NodeJS service?
Best regards

I think passport-windowsauth should be able to take care of it for you.

Related

How to make an API accessible all the time and not just when the project is executed?

I am making my first mobile app using Xamarin.Forms and FreshMVVM as the architecture and I want this app to get info off my SQL database (which is located in azure) by calling an API Rest. I already know how to develop an Api, and all the SQL and Azure related stuff, as well as how to get info from my API.
But what I don't know is how to access this API when the project in which is created is not executed, in other words, I don't know how to make my API Rest accessible all the time, so the App can access to it whenever is needed.
How do you do this?
Thank you all for your time, hope you have a good day.
You need to publish the API to a web host. Azure App Services. AWS. Digital Ocean VM running a web server. Possibly GoDaddy, though I have never used them. Your own server.

Azure App and Services and IdentityServer4

I have a situation where I have a React Web App and two REST services using Identity4 Server.
Problem is that these work well locally in my Workstation but if I deploy these three parts into Azure they will not work.
I have Azure SQL Database containing all Databases and tables it needs. Locally I use my local Database. So, Database is not the problem. It's deployed in same way with Azures manner.
My question is that how should I configure a React Web App using Identity4 Server with REST services?
I thing that Azure needs some kind of proper configuration but dont't know what.
I also have read Identity4 Server's documention pages but haven't found anything there that would help mr installing it into Azure.
Can anyone help me with this issue? thanks
Br
Mike
One error is HTTP 401 Unauthorized error

Single Sign On with NodeJS on Linux Server in Windows domain network

in the company i work for we've got a lot of windows 20xx servers.
we're using an active directory domain controller for authentication.
programs like SharePoint or Dynamics CRM 2015 (hosted on IIS of course) don't need a separate input of user credentials when opened in IE. you open it and you're logged in - magic :) i think it's something that only works with IIS?
i'm developing AngularJS applications with a NodeJS backend. NodeJS backend runs on linux machine, AngularJS app is hosted on the same machine by Nginx webserver. everything is in the same network.
is there any way to authenticate a user in my AngularJS app hosted on that linux machine without asking him/her for his/her credentials? a working solution that doesn't require IE would be best case.
thank you very much!

Is it possible to run a NodeJS app using phonegap?

I have a web app that is hosted on a web server that was created using NodeJS (http://www.ruffle.us). What I want to do is make this web app into a mobile application gaining access to the contact list to enter phone numbers. I have looked at technologies such as phonegap/cordova for this task but am still unsure from the documentation. Any experience or input on this would be appreciated.
Cordova provides a browser environment, so you can't run Node.js in it. But you can of course run your web frontend inside Cordova and use it to get access to device APIs like the contact list and communicate with your server.

Create a REST Web Service using Node.JS

i need to create a web service to connect to an oracle database from a mobile application
i found some tutorial about creating a web service by using NODE.JS
my question : is it possible to create a REST web service with Node.js to connect to oracle database from my mobile apps ??
if you have an other idea how to create a rest web service using php plz tell me
Php is one thing: a language; NodeJS is another thing: a software platform used to build network applications in JavaScript. I assume you want to develop in JavaScript and not Php.
Yes, it is possible to do what you want. Look into the following packages:
oracle db driver: driver to connect from your node.js app to the oracle db
express: a web development framework
In summary, express will serve as your web server, it will define the REST service endpoints, receive the mobile client's requests, fetch the data from the Oracle db with the help of the aforementioned db driver, and return this data to the mobile client.
You can get started fast with express by generating a base skeleton app just by running:
$ express myAppName
Absolutely. For the REST server side of things, you might be interested in express or restify From the REST server / application you can use something like node-oracle to connect to the Oracle database.

Resources