I am working on a rails web application that also provides a JSON-based API for mobile devices. It is expected that mobile clients will first receive a token with (email / pass), then clients will make subsequent API calls with a token.
I am new to Devise and I am looking for a Devise API similar to authenticate(email, pass) and expect it to return true / false, then based on this I will either create and return a token, or return a failure message, but it seems like Devise does not provide something like this.
I know that Devise 1.3 provides JSON-based authentication, but this is slightly different from what I need - I need to generate a token and process it back to the client, and then, after the authentication is completed, using the token.
Can someone please give some pointers?
json ruby api ruby-on-rails devise
Xiaotian Guo Sep 30 '11 at 18:55 2011-09-30 18:55
source share