Sha256: bdda91c15463366f94bbf3730ba6ec2f19e4192b90c0e5d5aba26913a17b0b3f

Contents?: true

Size: 559 Bytes

Versions: 18

Compression:

Stored size: 559 Bytes

Contents

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

    protect_from_forgery with: :null_session

    include WithApiErrors
    include WithAuthorization
    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

18 entries across 18 versions & 1 rubygems

Version Path
mumuki-laboratory-5.10.0 app/controllers/api/base_controller.rb
mumuki-laboratory-5.9.1 app/controllers/api/base_controller.rb
mumuki-laboratory-5.9.0 app/controllers/api/base_controller.rb
mumuki-laboratory-5.8.3 app/controllers/api/base_controller.rb
mumuki-laboratory-5.8.1 app/controllers/api/base_controller.rb
mumuki-laboratory-5.8.0 app/controllers/api/base_controller.rb
mumuki-laboratory-5.7.0 app/controllers/api/base_controller.rb
mumuki-laboratory-5.6.3 app/controllers/api/base_controller.rb
mumuki-laboratory-5.6.2 app/controllers/api/base_controller.rb
mumuki-laboratory-5.6.1 app/controllers/api/base_controller.rb
mumuki-laboratory-5.6.0 app/controllers/api/base_controller.rb
mumuki-laboratory-5.5.0 app/controllers/api/base_controller.rb
mumuki-laboratory-5.4.0 app/controllers/api/base_controller.rb
mumuki-laboratory-5.3.0 app/controllers/api/base_controller.rb
mumuki-laboratory-5.2.1 app/controllers/api/base_controller.rb
mumuki-laboratory-5.2.0 app/controllers/api/base_controller.rb
mumuki-laboratory-5.1.1 app/controllers/api/base_controller.rb
mumuki-laboratory-5.1.0 app/controllers/api/base_controller.rb