Sha256: b5237e102d31f0eec4bc232d80b019ebf02c2a52e5700f99d75742f1ed7f0bad
Contents?: true
Size: 661 Bytes
Versions: 33
Compression:
Stored size: 661 Bytes
Contents
require "webmachine" require "pact_broker/api/resources/authentication" module PactBroker module Diagnostic module Resources class BaseResource < Webmachine::Resource include PactBroker::Api::Resources::Authentication def is_authorized?(authorization_header) authenticated?(self, authorization_header) end def forbidden? return false if PactBroker.configuration.authorize.nil? !PactBroker.configuration.authorize.call(self, {}) end def base_url request.env["pactbroker.base_url"] || request.base_uri.to_s.chomp("/") end end end end end
Version data entries
33 entries across 33 versions & 1 rubygems