def sign_request(request)
      super(request)
      encodeCredentials = Base64.strict_encode64("#{user_name}:#{password}")
      credentials = "#{scheme} #{encodeCredentials}"

      if (request.respond_to?(:request_headers))
        request.request_headers[AUTHORIZATION] = credentials
      elsif request.respond_to?(:headers)
        request.headers[AUTHORIZATION] = credentials
      else
        fail ArgumentError, 'Incorrect request object was provided'
      end
    end
def sign_request(request)
      super(request)
      encodeCredentials = Base64.strict_encode64("#{user_name}:#{password}")
      credentials = "#{scheme} #{encodeCredentials}"

      if (request.respond_to?(:request_headers))
        request.request_headers[AUTHORIZATION] = credentials
      elsif request.respond_to?(:headers)
        request.headers[AUTHORIZATION] = credentials
      else
        fail ArgumentError, 'Incorrect request object was provided'
      end
    end
Creates and initialize new instance of the BasicAuthenticationCredentials class.
 @param user_name [String] the username for authentication.
 @param password [String] the password for authentication.
 @param scheme = DEFAULT_SCHEME [String] the scheme for composing credentials.

 Attaches basic authentication header to the given HTTP request.
 @param request [Net::HTTPRequest] the request authentication header needs to be attached to.

 @return [Net::HTTPRequest] request with attached authentication header.