[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

How can access to AUTH_USER?

music

5/30/2007 2:06:00 PM

With php I can access to AUTH_USER and REMOTE_ADDR to know the
authenticated user and the ip from which he come.
With ruby there is available REMOTE_ADDR but not AUTH_USER.
How can I access to the authenticated users?
4 Answers

Robert Klemme

5/30/2007 2:56:00 PM

0

On 30.05.2007 16:05, music wrote:
> With php I can access to AUTH_USER and REMOTE_ADDR to know the
> authenticated user and the ip from which he come.
> With ruby there is available REMOTE_ADDR but not AUTH_USER.
> How can I access to the authenticated users?

Guessing that you are talking about CGI the value is likely accessible
via ENV['AUTH_USER'] *if* the webserver you are using chose to put it
there (i.e. if it supports authentication and the user actually
authenticated). Just guessing of course...

Kind regards

robert

music

5/31/2007 11:33:00 AM

0

Robert Klemme wrote:
> On 30.05.2007 16:05, music wrote:
>> With php I can access to AUTH_USER and REMOTE_ADDR to know the
>> authenticated user and the ip from which he come.
>> With ruby there is available REMOTE_ADDR but not AUTH_USER.
>> How can I access to the authenticated users?
>
> Guessing that you are talking about CGI the value is likely accessible
> via ENV['AUTH_USER'] *if* the webserver you are using chose to put it
> there (i.e. if it supports authentication and the user actually
> authenticated). Just guessing of course...

Yes I'm talking about cgi in ruby.
I've used ENV["AUTH_USER"] but it has no value.
In php the variable AUTH_USER give me the authenticated user in ruby no.

Mariusz Pekala

5/31/2007 12:11:00 PM

0

On 2007-05-31 20:35:10 +0900 (Thu, May), music wrote:
> Robert Klemme wrote:
> >On 30.05.2007 16:05, music wrote:
> >>With php I can access to AUTH_USER and REMOTE_ADDR to know the
> >>authenticated user and the ip from which he come.
> >>With ruby there is available REMOTE_ADDR but not AUTH_USER.
> >>How can I access to the authenticated users?
> >
> >Guessing that you are talking about CGI the value is likely accessible
> >via ENV['AUTH_USER'] *if* the webserver you are using chose to put it
> >there (i.e. if it supports authentication and the user actually
> >authenticated). Just guessing of course...
>
> Yes I'm talking about cgi in ruby.
> I've used ENV["AUTH_USER"] but it has no value.
> In php the variable AUTH_USER give me the authenticated user in ruby no.
>

Look for HTTP_AUTH_USER, maybe.

--
No virus found in this outgoing message.
Checked by 'grep -i virus $MESSAGE'
Trust me.

Jano Svitok

5/31/2007 12:32:00 PM

0

On 5/31/07, music <music@musi.ca> wrote:
> Robert Klemme wrote:
> > On 30.05.2007 16:05, music wrote:
> >> With php I can access to AUTH_USER and REMOTE_ADDR to know the
> >> authenticated user and the ip from which he come.
> >> With ruby there is available REMOTE_ADDR but not AUTH_USER.
> >> How can I access to the authenticated users?
> >
> > Guessing that you are talking about CGI the value is likely accessible
> > via ENV['AUTH_USER'] *if* the webserver you are using chose to put it
> > there (i.e. if it supports authentication and the user actually
> > authenticated). Just guessing of course...
>
> Yes I'm talking about cgi in ruby.
> I've used ENV["AUTH_USER"] but it has no value.
> In php the variable AUTH_USER give me the authenticated user in ruby no.

Either: have a look at all the ENV variables, and try the similar
ones, as suggested in the previous mail, or check your webserver
configuration if it sends the var at all.