21
我使用rails-api需要用authenticate_with_http_token
處理頭授權令牌,但我得到了以下錯誤:如何使用rails-api使用authenticate_with_http_token?
NoMethodError (undefined method `authenticate_with_http_token' for ...)
我使用rails-api需要用authenticate_with_http_token
處理頭授權令牌,但我得到了以下錯誤:如何使用rails-api使用authenticate_with_http_token?
NoMethodError (undefined method `authenticate_with_http_token' for ...)
添加以下ApplicationController
include ActionController::HttpAuthentication::Token::ControllerMethods