Sha256: 911885a3a407d647324405b33ee5c550351d303f8dcd9836c9eec76bd808b80f

Contents?: true

Size: 663 Bytes

Versions: 1

Compression:

Stored size: 663 Bytes

Contents

# bandwidth
#
# This file was automatically generated by APIMATIC v2.0
# ( https://apimatic.io ).

require 'base64'

module Bandwidth
  # Utility class for basic authorization.
  class VoiceBasicAuth
    # Add basic authentication to the request.
    # @param [HttpRequest] The HttpRequest object to which authentication will
    # be added.
    def self.apply(config, http_request)
      username = config.voice_basic_auth_user_name
      password = config.voice_basic_auth_password
      value = Base64.strict_encode64("#{username}:#{password}")
      header_value = "Basic #{value}"
      http_request.headers['Authorization'] = header_value
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bandwidth-sdk-0.1.0 lib/bandwidth/http/auth/voice_basic_auth.rb