» Using auth_token from request headers instead from POST/PUT parameters with Rails 3 / devise
Using auth_token from request headers instead from POST/PUT parameters with Rails 3 / devise
|September 13, 2011
Posted by forumadmin
I need to use token based authentication in a Rails 3.1 API in conjunction with the most recent version of devise. No problem so far.
Now I do not want to append my :auth_token to the POST/PUT parameters on client side but send this token as a request header like HTTP_X_MYAPP_AUTH_TOKEN”.
Can I convince devise from using that rather than a token from parameters? Is it possible to implement both, so that my API users can send the token via request header OR POST/PUT parameter?
More Related Questions
- Token Authenticatable module in Devise I'm starting using Devise in my Rails app, but the Token Authenticatable: signs in a user based on an authentication token (also known as "single access token") module puzzles me.
Is the […]
- Using Devise tokens to log in, is this built in? So, I'm trying to use tokens with Devise (version 1.0.3 with Rails 2.3.8) to let a user log in, but I'm not entirely sure where to […]
- Adding token_authenticatable to devise with migration I have already created a User Model using devise, but I now want to add support for token_authenticable, so I need to migrate these additions. Is the following correct, and what type […]
- API routes for Devise Token Authentication I'm using Devise in a Rails 3 app for user authentication. This app also serves API responses to a mobile application. I read that Devise removed their token authentication feature for […]
- How use token authentication with Rails, Devise and Backbone.js? I'm trying to build a mobile application with PhoneGap, jQuery Mobile and Backbone.js on the client-side - with a Rails 3 JSON API running server-side.
I know how to fetch the token from […]
- Extending Devise SessionsController to authenticate using JSON I am trying to build a rails API for an iphone app. Devise works fine for logins through the web interface but I need to be able to create and destroy sessions using REST API and I want to […]
- User Authentication into Devise from iOS I am creating an application where user is going to sign in with username and password. At the back end and also for the website I am using ruby on rails where the authentication is […]
- RoR Devise: Sign in with username OR email What's the best way to enable users to log in with their email address OR their username? I am using warden + devise for authentication. I think it probably won't be too hard to do it but […]
- Profile model for Devise users? i want to extened the sign up form of my devise installation. i created a Profile model and asking myself now, how can i add specific data of the form to this model. Where is the […]
- Devise : Get full profile information I am trying to get information from full profile from a user , specifically all the past positions.
Here is the code in devise.rb:
config.omniauth :linkedin, ENV["LINKEDIN_API_KEY"], […]