Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Basic authentication with WEBrick?

Reply
Thread Tools

Basic authentication with WEBrick?

 
 
vasudevram
Guest
Posts: n/a
 
      09-06-2006

Hi,

We are using WEBrick on port 80 for development of a Rails app. [We may
move to Mongrel or some other option later].

Assume our host is http://my.host.com.

When we go to http://my.host.com, we get our Rails app's first page
shown correctly.
At this page we will have a login form with username and password.

But we also want to have one more level of authentication, before this
form is shown, a Web server authentication, i.e. when a user tries to
access the URL http://my.host.com, a login dialog should be shown
asking for a username and password - not the username and password of
the Rails app, but one that is handled by the WEBrick server - as I
think is possible (not sure) if using Apache as the web server. Is
there a way to do this with WEBrick?

Thanks
Vasudev
http://www.dancingbison.com

 
Reply With Quote
 
 
 
 
Manfred Stienstra
Guest
Posts: n/a
 
      09-07-2006
vasudevram wrote:
> But we also want to have one more level of authentication, before this
> form is shown, a Web server authentication, i.e. when a user tries to
> access the URL http://my.host.com, a login dialog should be shown
> asking for a username and password - not the username and password of
> the Rails app, but one that is handled by the WEBrick server - as I
> think is possible (not sure) if using Apache as the web server. Is
> there a way to do this with WEBrick?


Sure, you can just send http basic or digest authentication headers
from Rails or if you hack around a little bit, WEBrick. I just released
a library for http authentication last week, the digest stuff is still
beta, but you can use the basic authentication.

http://httpauth.rubyforge.org/classe...uth/Basic.html

The rubyforge project page is here:

http://rubyforge.org/projects/httpauth/

 
Reply With Quote
 
 
 
 
Eric Hodel
Guest
Posts: n/a
 
      09-07-2006
On Sep 6, 2006, at 9:40 AM, vasudevram wrote:

> We are using WEBrick on port 80 for development of a Rails app. [We
> may
> move to Mongrel or some other option later].
>
> Assume our host is http://my.host.com.
>
> When we go to http://my.host.com, we get our Rails app's first page
> shown correctly.
> At this page we will have a login form with username and password.
>
> But we also want to have one more level of authentication, before this
> form is shown, a Web server authentication, i.e. when a user tries to
> access the URL http://my.host.com, a login dialog should be shown
> asking for a username and password - not the username and password of
> the Rails app, but one that is handled by the WEBrick server - as I
> think is possible (not sure) if using Apache as the web server. Is
> there a way to do this with WEBrick?


http://microjet.ath.cx/webrickguide/...ntication.html

--
Eric Hodel - http://www.velocityreviews.com/forums/(E-Mail Removed) - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com



 
Reply With Quote
 
vasudevram
Guest
Posts: n/a
 
      09-10-2006

Eric Hodel wrote:
> On Sep 6, 2006, at 9:40 AM, vasudevram wrote:
>
> > We are using WEBrick on port 80 for development of a Rails app. [We
> > may
> > move to Mongrel or some other option later].
> >
> > Assume our host is http://my.host.com.
> >
> > When we go to http://my.host.com, we get our Rails app's first page
> > shown correctly.
> > At this page we will have a login form with username and password.
> >
> > But we also want to have one more level of authentication, before this
> > form is shown, a Web server authentication, i.e. when a user tries to
> > access the URL http://my.host.com, a login dialog should be shown

>
> http://microjet.ath.cx/webrickguide/...ntication.html
>
> --
> Eric Hodel - (E-Mail Removed) - http://blog.segment7.net
> This implementation is HODEL-HASH-9600 compliant
>
> http://trackmap.robotcoop.com


Thanks, all. Will check the links given.

Vasudev
http://www.dancingbison.com

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Basic Authentication to Form-Based Authentication Dom Java 0 10-18-2004 03:30 PM
From Basic Authentication to Form-Based Authentication Dom Java 0 10-15-2004 09:50 PM
Forms Authentication displays basic authentication dialogue window Brett Porter ASP .Net 5 02-03-2004 07:06 PM
Basic Authentication v. Integrated Windows Authentication w/ Delegation Mark ASP .Net 0 01-20-2004 03:13 PM
ASP.Net Forms authentication with basic authentication popup Brett Porter ASP .Net 2 01-20-2004 02:17 PM



Advertisments