Reputation: 8689
How should I go about creating a restful API in rails 3 app? Also I would like to know if there is a good way to implement restful authentication
Upvotes: 4
Views: 2567
Reputation: 43
If you're looking for a way to authenticate applications that are using your API, checkout the the restful_api_authentication gem - https://rubygems.org/gems/restful_api_authentication
Upvotes: 2
Reputation: 297
The easiest way to create RESTful authentication in Rails is the combination of a User Model and a Session controller. So you will have new(login), create(authenticate), destroy(logout) actions in the Session controller. Depending on the app its fairly easy to write your own authentication. This screencast shows how easy it is. Authentication in Rails 3.1
Upvotes: 1