class Patron::Request

def credentials

Returns:
  • (String, NilClass) - the authentication string or nil if no authentication is used
def credentials
  return nil if username.nil? || password.nil?
  "#{username}:#{password}"
end