module Klarna::Checkout::Resources::Authentication

Public Instance Methods

authorization() click to toggle source
# File lib/klarna/checkout/resources/authentication.rb, line 7
def authorization
  uid  = Klarna::Checkout.configuration.user_id
  pass = Klarna::Checkout.configuration.passcode

  encode_base64(uid, pass)
end

Private Instance Methods

encode_base64(username, password) click to toggle source
# File lib/klarna/checkout/resources/authentication.rb, line 16
def encode_base64(username, password)
  ['Basic', Base64.encode64("#{username}:#{password}").chomp].join(' ')
end