How to get the User_logged in windows with Sinatra

I need to know the user that is accessing the intranet i created with
Sinatra something like in asp.NET Request.ServerVariables[“AUTH_USER”]
I’ve been taking a look at the object request… it gives a lot of info
but not the network username :frowning:

In the server I’m running Ruby 1.8.7, Sinatra and Thin

Any idea how to solve this?

On Mon, Jul 8, 2013 at 9:06 AM, Mario R. [email protected] wrote:

In the server I’m running Ruby 1.8.7, Sinatra and Thin

Any idea how to solve this?

I’m not sure I understand. You want to get the Windows username of the
person logging in to your Sinatra site?

Yes like… for example in IIS when enabling Windows Authentication

I have explored this as well, you’ll need to use a web server like
Apache or nginx with mod_kerberos (or similar) and reverse proxy to your
application. I have seen a few gems that do NTLM natively, but I haven’t
ever tried them. Another option would be to reverse proxy through IIS,
although I’m not 100% sure if this is possible (or feasible in your
environment).

-Ryan V.