2015-04-04 17:46:55 +00:00
|
|
|
require 'authentication/warden_authentication'
|
|
|
|
|
2014-03-05 09:05:45 +00:00
|
|
|
module Api
|
2015-04-04 17:46:55 +00:00
|
|
|
class BaseController < ActionController::Base
|
2014-03-05 09:05:45 +00:00
|
|
|
|
2015-04-04 17:46:55 +00:00
|
|
|
include WardenAuthentication
|
2015-10-08 12:36:47 +00:00
|
|
|
include RouteHelper
|
2014-03-05 09:05:45 +00:00
|
|
|
|
|
|
|
private
|
|
|
|
|
2015-04-04 17:46:55 +00:00
|
|
|
def warden_scope
|
|
|
|
:api
|
2014-03-05 09:05:45 +00:00
|
|
|
end
|
|
|
|
|
2016-01-29 10:29:18 +00:00
|
|
|
def warden_strategies
|
|
|
|
[:api_token]
|
|
|
|
end
|
|
|
|
|
2014-03-05 09:05:45 +00:00
|
|
|
end
|
|
|
|
end
|