Sha256: de35e1bb4ab1f66ed0801a82e483ffc86bc381c4381e9d90b527ae80c03f9b21
Contents?: true
Size: 751 Bytes
Versions: 9
Compression:
Stored size: 751 Bytes
Contents
# frozen_string_literal: true require 'digest/md5' require 'param/secure_auth_header' require 'param/simple_auth_header' module Uploadcare module Param # This object returns headers needed for authentication # This authentication method is more secure, but more tedious class AuthenticationHeader # @see https://uploadcare.com/docs/api_reference/rest/requests_auth/#auth-uploadcare def self.call(options = {}) case Uploadcare.config.auth_type when 'Uploadcare' SecureAuthHeader.call(options) when 'Uploadcare.Simple' SimpleAuthHeader.call else raise ArgumentError, "Unknown auth_scheme: '#{Uploadcare.config.auth_type}'" end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems