-
Notifications
You must be signed in to change notification settings - Fork 581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
provide access to the windows identity of the authenticated user to node.js app #87
Comments
this would be very useful :) |
The fix is to provide a mechanism in iisnode to promote any of the IIS server variables to X-iisnode-* HTTP request headers. To choose which of the IIS server variables are promoted to X-iisnode-* HTTP request headers, use the iisnode@promoteServerVars configuration property. It specifies a comma-separated list of IIS variables names. A variable FOO is promoted to X-iisnode-FOO HTTP request header only if it is actually defined for a particular request. By default no IIS server variables are promoted. For example, to obtain the username of the authenticated caller and the authentication type, configure iisnode as follows:
The node.js application can then access these values using the following code:
For a complete list of IIS server variables that can be promoted see http://msdn.microsoft.com/en-us/library/ms524602.aspx |
@tjanczuk I know this has been here for a while now, but how would I replicate this without IIS or apache? I'm developing locally and just running the express app through command line/webstorm. |
When IIS is configured to require windows authentication, there is currently no way within the node.js application to determine the name of the authenticated user. This is to provide a mechanism to access that username. One possibility is to use X-* HTTP request headers to convey this information from iisnode to node.exe on a per-request basis.
This is from http://tomasz.janczuk.org/2011/08/using-url-rewriting-with-nodejs.html?showComment=1321821547800#c8998354757283280788.
The text was updated successfully, but these errors were encountered: