# Login Restfully

**URL:** <https://www.ruby-forum.com/t/login-restfully/102105>\
**Category:** Rails\
**Created:** [August 10, 2006, 8:46pm UTC](https://www.ruby-forum.com/t/login-restfully/102105 "2006-08-10T20:46:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![guest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8dc957/32.png) [@guest](https://www.ruby-forum.com/u/guest)\
**Post date:** [August 10, 2006, 8:46pm UTC](https://www.ruby-forum.com/t/login-restfully/102105/1 "2006-08-10T20:46:31Z")

</div>

In DHH’s keynote, he alluded to doing logins with REST. Has anyone  
implemented this, and if so, would you mind elaborating on how you did  
it please?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![guest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8dc957/32.png) [@guest](https://www.ruby-forum.com/u/guest)\
**Post date:** [August 10, 2006, 9:35pm UTC](https://www.ruby-forum.com/t/login-restfully/102105/2 "2006-08-10T21:35:23Z")

</div>

Guest wrote:

> In DHH’s keynote, he alluded to doing logins with REST. Has anyone  
> implemented this, and if so, would you mind elaborating on how you did  
> it please?
> 
> Thanks in advance.

Only one I know of:  
[http://svn.techno-weenie.net/projects/plugins/restful\_authentication/](http://svn.techno-weenie.net/projects/plugins/restful_authentication/)

---

<div class="post-metadata">

**Author:** ![guest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8dc957/32.png) [@guest](https://www.ruby-forum.com/u/guest)\
**Post date:** [August 10, 2006, 10:00pm UTC](https://www.ruby-forum.com/t/login-restfully/102105/3 "2006-08-10T22:00:44Z")

</div>

Great thanks!

David C. wrote:

> Guest wrote:
> 
> > In DHH’s keynote, he alluded to doing logins with REST. Has anyone  
> > implemented this, and if so, would you mind elaborating on how you did  
> > it please?
> > 
> > Thanks in advance.
> 
> Only one I know of:  
> [http://svn.techno-weenie.net/projects/plugins/restful\_authentication/](http://svn.techno-weenie.net/projects/plugins/restful_authentication/)

---

<div class="post-metadata">

**Author:** ![guest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8dc957/32.png) [@guest](https://www.ruby-forum.com/u/guest)\
**Post date:** [August 15, 2006, 2:16pm UTC](https://www.ruby-forum.com/t/login-restfully/102105/4 "2006-08-15T14:16:00Z")

</div>

I tried it on depot application and I get the following error ☹ (I am  
using Rails 1.1.4)

22:47:18:~/work/depot \> script/plugin source  
[http://svn.techno-weenie.net/projects/plugins](http://svn.techno-weenie.net/projects/plugins)  
Cannot find gem for Rails =1.1.2:  
Install the missing gem with ‘gem install -v=1.1.2 rails’, or  
change environment.rb to define RAILS\_GEM\_VERSION with your desired  
version.

Could you please clarify? TIA

---

<div class="post-metadata">

**Author:** ![guest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8dc957/32.png) [@guest](https://www.ruby-forum.com/u/guest)\
**Post date:** [August 15, 2006, 2:15pm UTC](https://www.ruby-forum.com/t/login-restfully/102105/5 "2006-08-15T14:15:51Z")

</div>

Create a sessions model and login by 'create’ing a new session.  
Logout would simply map to destroy. Also, take a look at Rick O.'s  
restful auth plugin at:  
[http://weblog.techno-weenie.net/2006/8/1/restful-authentication-plugin](http://weblog.techno-weenie.net/2006/8/1/restful-authentication-plugin)

–  
Zack C.  
[http://depixelate.com](http://depixelate.com)

---

<div class="post-metadata">

**Author:** ![guest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8dc957/32.png) [@guest](https://www.ruby-forum.com/u/guest)\
**Post date:** [August 15, 2006, 2:17pm UTC](https://www.ruby-forum.com/t/login-restfully/102105/6 "2006-08-15T14:17:00Z")

</div>

On 8/10/06, Bala P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I tried it on depot application and I get the following error ☹ (I am using Rails 1.1.4)
> 
> 22:47:18:~/work/depot \> script/plugin source [http://svn.techno-weenie.net/projects/plugins](http://svn.techno-weenie.net/projects/plugins)  
> Cannot find gem for Rails =1.1.2:  
> Install the missing gem with ‘gem install -v=1.1.2 rails’, or  
> change environment.rb to define RAILS\_GEM\_VERSION with your desired version.
> 
> Could you please clarify? TIA

According to the error message, Rails 1.1.2 is not found. Either  
install it, or change environment.rb to define RAILS\_GEM\_VERSION with  
the desired version. I’d suggest doing a quick upgrade and changing  
it to 1.1.6.

–  
Rick O.  
[http://weblog.techno-weenie.net](http://weblog.techno-weenie.net)  
[http://mephistoblog.com](http://mephistoblog.com)

---

<div class="post-metadata">

**Author:** ![guest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8dc957/32.png) [@guest](https://www.ruby-forum.com/u/guest)\
**Post date:** [August 15, 2006, 2:18pm UTC](https://www.ruby-forum.com/t/login-restfully/102105/7 "2006-08-15T14:18:50Z")

</div>

I’d use another model name than sessions, as that collides with the  
ActiveRecordStore session handler.
