basic layout template
This commit is contained in:
14
app/controllers/api/api_controller.rb
Normal file
14
app/controllers/api/api_controller.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class Api::ApiController < ActionController::API
|
||||
include TokenVerification
|
||||
helper_method :current_token
|
||||
|
||||
#this is base api base controller to need to inherit.
|
||||
#all token authentication must be done here
|
||||
#response format must be set to JSON
|
||||
def current_token
|
||||
authenticate_with_http_token do |token, options|
|
||||
return token
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user