Class: Api::Vendor::V1::Klook::BaseController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Api::Vendor::V1::Klook::BaseController
- Includes:
- Concerns::IntegrationTestHelpers, ElasticAPM::SpanHelpers, EncryptableHelper, ResponseCacheConcern
- Defined in:
- app/controllers/api/vendor/v1/klook/base_controller.rb
Direct Known Subclasses
AvailabilitiesController, BookingsController, ProductsController, SuppliersController
Constant Summary collapse
- CACHE_NAMESPACE =
'api_vendor_v1_klook_cache'.freeze
Instance Attribute Summary collapse
-
#vendor ⇒ Object
readonly
Returns the value of attribute vendor.
Instance Method Summary collapse
Methods included from ResponseCacheConcern
Methods included from EncryptableHelper
#decrypt, #encrypt, #generate_signature
Methods inherited from ApplicationController
#after_sign_in_path_for, #after_sign_out_path_for, #default_url_options, #render_not_found, #routing_error, search_params_key=
Methods included from LogrageCustomLogger
Methods included from ControllerHelpers
#check_boolean_param, #get_banners, #inventory_params, #reservation_params
Instance Attribute Details
#vendor ⇒ Object (readonly)
Returns the value of attribute vendor.
13 14 15 |
# File 'app/controllers/api/vendor/v1/klook/base_controller.rb', line 13 def vendor @vendor end |
Instance Method Details
#authentication ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'app/controllers/api/vendor/v1/klook/base_controller.rb', line 15 def authentication authenticate_or_request_with_http_token do |token, | @vendor ||= set_vendor! return unless @vendor return true if integration_test_mode? && integration_test_vendor_application&.uid == token return true if @vendor.uid == token return end end |