Rails and HTTP Authentication

M

MaggotChild

Hi, I would like to restrict access the the basic CRUD ops via
htaccess. Requests for /item/list, /item/add etc would prompt the user
for their password. I was thinking I would create a new directory,
apply the htaccess settings, and put a dispatch script in there. But
then I would have to configure rails to look in multiple directories
for a controller (something I dont know how to do), and have two
dispatch.cgi files. What is the ideal approach to achieving security in
rails via htaccess?

Thanks!
 
E

Eric Hodel

What is the ideal approach to achieving security in rails via
htaccess?

You want to ask this question on the Rails mailing list, this list is
for generic ruby questions.
 
M

MaggotChild

MaggotChild said:
Hi, I would like to restrict access the the basic CRUD ops via
htaccess. Requests for /item/list, /item/add etc would prompt the user
for their password. I was thinking I would create a new directory,
apply the htaccess settings, and put a dispatch script in there. But
then I would have to configure rails to look in multiple directories
for a controller (something I dont know how to do), and have two
dispatch.cgi files. What is the ideal approach to achieving security in
rails via htaccess?

Thanks!


Found the following plugin:
http://blog.codahale.com/2006/05/11/basic-http-authentication-with-rails-simple_http_auth/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,118
Latest member
LatishaWhy
Top