-
Notifications
You must be signed in to change notification settings - Fork 275
Closed
Description
class Api::V1::ApplicationController < ActionController::API
include ActionController::HttpAuthentication::Basic::ControllerMethods
before_filter :require_token
private
def require_token
authenticate_or_request_with_http_token do |key, options|
@current_user = Token.find_by_key(key).account if Token.exists?(key: key)
end
end
endThis results in the error:
NoMethodError: undefined method `authenticate_or_request_with_http_token' for #<Api::V1::AccountsController:0x007ffc81a50818>
/Users/krainboltgreene/Code/Ruby/manacurve-api/app/controllers/api/v1/application_controller.rb:9:in `require_token'
As I understand it, including that module should allow me access to the Token auth.
Metadata
Metadata
Assignees
Labels
No labels