title: How to config devise to accept auth token in HTTP header?
body: <p>Currently, <a href="http://rubygems.org/gems/devise">devise</a> is configured to accept token authentication via URL and curl works well</p>
  
  <pre><code>curl 'http://localhost/index.json?auth_token=TOKENVALUE'
  </code></pre>
  
  <p>Now I'd like to pass the TOKENVALUE via HTTP header instead of URL, how can I config devise to get the TOKENVALUE from <em>either</em> HTTP header <em>or</em> URL? Such that both the above and following curl requests will work:</p>
  
  <pre><code>curl 'http://localhost/index.json' -H 'Authorization: Token token="TOKENVALUE"'
  </code></pre>
  
  <p>as shown in <a href="http://railscasts.com/episodes/352-securing-an-api?view=asciicast">this railscast</a>.</p>