Class: Uploadcare::Param::AuthenticationHeader

Inherits:
Object
  • Object
show all
Defined in:
lib/uploadcare/param/authentication_header.rb

Overview

This object returns headers needed for authentication This authentication method is more secure, but more tedious

Class Method Summary collapse

Class Method Details

.call(options = {}) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'lib/uploadcare/param/authentication_header.rb', line 13

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