Class: OpenStax::Api::V1::ApiController

Inherits:
ApplicationController
  • Object
show all
Includes:
Apipie, Roar, Roar::Rails::ControllerAdditions
Defined in:
app/controllers/openstax/api/v1/api_controller.rb

Instance Method Summary collapse

Methods included from Apipie

included

Methods included from Roar

#get_representer, #standard_create, #standard_destroy, #standard_nested_create, #standard_read, #standard_sort, #standard_update

Instance Method Details

#current_userObject

Always return an ApiUser



44
45
46
47
# File 'app/controllers/openstax/api/v1/api_controller.rb', line 44

def current_user
  @current_api_user ||= ApiUser.new(doorkeeper_token,
                                    lambda { current_application_user })
end