Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Basic authentication with WEBrick?
vasudevram
9/6/2006 4:39:00 PM
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://m...
.
When we go to
http://m...
, 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://m...
, 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.dancin...
3 Answers
Manfred Stienstra
9/7/2006 6:38:00 AM
0
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://m...
, 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/classes/HTTPAuth/...
The rubyforge project page is here:
http://rubyforge.org/projects...
Eric Hodel
9/7/2006 6:04:00 PM
0
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://m...
.
>
> When we go to
http://m...
, 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://m...
, 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/html/HTTP_Authentic...
--
Eric Hodel - drbrain@segment7.net -
http://blog.se...
This implementation is HODEL-HASH-9600 compliant
http://trackmap.rob...
vasudevram
9/10/2006 4:30:00 PM
0
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://m...
.
> >
> > When we go to
http://m...
, 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://m...
, a login dialog should be shown
>
>
http://microjet.ath.cx/webrickguide/html/HTTP_Authentic...
>
> --
> Eric Hodel - drbrain@segment7.net -
http://blog.se...
> This implementation is HODEL-HASH-9600 compliant
>
>
http://trackmap.rob...
Thanks, all. Will check the links given.
Vasudev
http://www.dancin...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Basic authentication with WEBrick?
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password