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.9.0 app/controllers/api/base_controller.rb
mumuki-laboratory-9.8.2 app/controllers/api/base_controller.rb
mumuki-laboratory-9.8.1 app/controllers/api/base_controller.rb
mumuki-laboratory-9.8.0 app/controllers/api/base_controller.rb
mumuki-laboratory-9.7.2 app/controllers/api/base_controller.rb
mumuki-laboratory-9.7.1 app/controllers/api/base_controller.rb
mumuki-laboratory-9.7.0 app/controllers/api/base_controller.rb
mumuki-laboratory-9.6.0 app/controllers/api/base_controller.rb
mumuki-laboratory-9.5.1 app/controllers/api/base_controller.rb
mumuki-laboratory-9.5.0 app/controllers/api/base_controller.rb
mumuki-laboratory-9.4.1 app/controllers/api/base_controller.rb
mumuki-laboratory-9.4.0 app/controllers/api/base_controller.rb
mumuki-laboratory-9.3.1 app/controllers/api/base_controller.rb
mumuki-laboratory-9.3.0 app/controllers/api/base_controller.rb
mumuki-laboratory-9.2.0 app/controllers/api/base_controller.rb
mumuki-laboratory-9.1.3 app/controllers/api/base_controller.rb
mumuki-laboratory-9.1.2 app/controllers/api/base_controller.rb
mumuki-laboratory-9.1.1 app/controllers/api/base_controller.rb
mumuki-laboratory-9.1.0 app/controllers/api/base_controller.rb
mumuki-laboratory-9.0.6 app/controllers/api/base_controller.rb