how to get windows username
Copy link to clipboard
Copied
Hi All,
I need to have the windows username to check whether he is an internal user or an external user to our application.
We are using LDAP authentication for our application; is there anyway to get the windows username in coldfusion?
I checked some blogs and site to use #cgi.auth_user#, but its not working;
I use Coldfusion 9.0 and Apache 2.2.
Any inputs are appreciated.
Copy link to clipboard
Copied
In what way is cgi.auth_user not working?
Copy link to clipboard
Copied
Unless you are using WIndows Authentication in IIS for the website, I don't think that you will see information in that cgi variable. There is no way, without using a browser plug-in, to find the info about the client. it is outside of the javascript sandbox. Even if you use WIndows authentication, I'm pretty sure that it is not guananteed to be in the cgi var - firewalls can and do filter out that data.
-reed

