class RestClientWrapper::Authenticator::Basic
Public Class Methods
new(**config)
click to toggle source
# File lib/rest_client_wrapper/authenticators/basic.rb, line 32 def initialize(**config) @username = config[:username] @password = config[:password] end
Public Instance Methods
generate_auth()
click to toggle source
# File lib/rest_client_wrapper/authenticators/basic.rb, line 37 def generate_auth return { Authorization: "Basic #{ Base64.strict_encode64("#{ @username }:#{ @password }") }" } end