Forum: Ruby on Rails Authentication and Authorization

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
(Guest)
on 2007-04-03 20:30
(Received via mailing list)
Hi!

   I have a question about authentication and authorization.  I would
like to authenticate users through apache, and pass their username
across into rails.  In rails, I have a table in my database called
'people', a table called 'groups', and a table called 'results'.  I
would like rails to look up the group_id in the people table, and
filter rows in the 'results' table based on the group_id.  I also have
a 'group_id' in the results table.

   So, for example, if my login name was 'bob' and my group was 'hr'
with a group id of '1', it would have 'bob' and '1' in the people
table, '1' 'hr' in the group table, and '1' in the results table.
Then, when bob logs in, he would see just 'hr' information from the
results table.

   I was hoping somebody could recommend something or a 'howto' to do
this.  I stumbled upon some authentication programs, but it seems like
they are either too advanced or either allow or deny somebody.


Thanks in advanced....
tharealpatton (Guest)
on 2007-04-03 20:36
(Received via mailing list)
Check out Coda Hale's Simple HTTP Auth plugin.  You should be able to
accomplish what you want with it.

http://blog.codahale.com/2006/05/11/basic-http-aut...
This topic is locked and can not be replied to.