# RESTful authentication for REST web services

**URL:** <https://www.ruby-forum.com/t/restful-authentication-for-rest-web-services/119940>\
**Category:** Rails\
**Created:** [November 12, 2007, 1:06pm UTC](https://www.ruby-forum.com/t/restful-authentication-for-rest-web-services/119940 "2007-11-12T13:06:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhfs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b2d939/32.png) [@mhfs](https://www.ruby-forum.com/u/mhfs)\
**Post date:** [November 12, 2007, 1:06pm UTC](https://www.ruby-forum.com/t/restful-authentication-for-rest-web-services/119940/1 "2007-11-12T13:06:24Z")

</div>

Hello,

I’ve already searched google, but most of articles make the assumption  
that the user agent is a browser.

What if the user is accessing the same REST controller action via  
another client (another ruby script for example)? How could I restrict  
it to users that have an account in the system?

it’s really a basic question - the app only serves certain parts of  
the website for logged users when accessed through a browser user  
agent, I want the same thing to happen when someone is accessing it  
from another client and the app is responding the same action with a  
different format (XML or RSS for example)

Thanks,

Marcelo.

---

<div class="post-metadata">

**Author:** ![mhfs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b2d939/32.png) [@mhfs](https://www.ruby-forum.com/u/mhfs)\
**Post date:** [November 12, 2007, 5:42pm UTC](https://www.ruby-forum.com/t/restful-authentication-for-rest-web-services/119940/2 "2007-11-12T17:42:34Z")

</div>

I believe the typical method is to use http authentication.

–Michael
