30

I am using rails-api and need to use authenticate_with_http_token to process a header authorization token, but i get the following error:

NoMethodError (undefined method `authenticate_with_http_token' for ...)
andorov
  • 4,197
  • 3
  • 39
  • 52

1 Answers1

47

Add the following to ApplicationController

include ActionController::HttpAuthentication::Token::ControllerMethods
RenaudC5
  • 3,553
  • 1
  • 11
  • 29
andorov
  • 4,197
  • 3
  • 39
  • 52