Sha256: 056f66ba4f64579a6bc9e30a4f9543e112a9680ed867a2a993115a68c26c3120

Contents?: true

Size: 562 Bytes

Versions: 46

Compression:

Stored size: 562 Bytes

Contents

module Api
  class BaseController < ActionController::Base
    Mumukit::Login.configure_controller! self

    protect_from_forgery with: :null_session

    include Mumuki::Laboratory::Controllers::DynamicErrors
    include Mumuki::Laboratory::Controllers::CurrentOrganization

    before_action :set_current_organization!

    include OnBaseOrganizationOnly

    before_action :verify_api_client!

    private

    def verify_api_client!
      ApiClient.verify_token! Mumukit::Auth::Token.extract_from_header(request.env['HTTP_AUTHORIZATION'])
    end
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
mumuki-laboratory-9.23.0 app/controllers/api/base_controller.rb
mumuki-laboratory-9.22.0 app/controllers/api/base_controller.rb
mumuki-laboratory-9.21.0 app/controllers/api/base_controller.rb
mumuki-laboratory-9.20.1 app/controllers/api/base_controller.rb
mumuki-laboratory-9.20.0 app/controllers/api/base_controller.rb
mumuki-laboratory-9.19.0 app/controllers/api/base_controller.rb
mumuki-laboratory-9.18.1 app/controllers/api/base_controller.rb
mumuki-laboratory-9.18.0 app/controllers/api/base_controller.rb
mumuki-laboratory-9.17.0 app/controllers/api/base_controller.rb
mumuki-laboratory-9.16.0 app/controllers/api/base_controller.rb
mumuki-laboratory-9.15.0 app/controllers/api/base_controller.rb
mumuki-laboratory-9.14.1 app/controllers/api/base_controller.rb
mumuki-laboratory-9.14.0 app/controllers/api/base_controller.rb
mumuki-laboratory-9.13.2 app/controllers/api/base_controller.rb
mumuki-laboratory-9.13.1 app/controllers/api/base_controller.rb
mumuki-laboratory-9.13.0 app/controllers/api/base_controller.rb
mumuki-laboratory-9.12.1 app/controllers/api/base_controller.rb
mumuki-laboratory-9.12.0 app/controllers/api/base_controller.rb
mumuki-laboratory-9.11.0 app/controllers/api/base_controller.rb
mumuki-laboratory-9.10.0 app/controllers/api/base_controller.rb