)]}'
{"ara/clients/http.py":[{"author":{"_account_id":29199,"name":"Florian Apolloner","email":"florian@apolloner.eu","username":"apollo13"},"change_message_id":"2fed392489ba1519f26f1010a66603484962bc3f","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        }"},{"line_number":41,"context_line":"        self.http \u003d requests.Session()"},{"line_number":42,"context_line":"        self.http.headers.update(self.headers)"},{"line_number":43,"context_line":"        if username is not None and password is not None:"},{"line_number":44,"context_line":"            self.http.auth \u003d (username, password)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def _request(self, method, url, **payload):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_6fc00d52","line":43,"updated":"2019-04-10 20:14:02.000000000","message":"Same as below","commit_id":"8db5eac7094220968bda98aa5f8065628017b345"},{"author":{"_account_id":29199,"name":"Florian Apolloner","email":"florian@apolloner.eu","username":"apollo13"},"change_message_id":"2fed392489ba1519f26f1010a66603484962bc3f","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"class AraHttpClient(object):"},{"line_number":73,"context_line":"    def __init__(self, endpoint\u003d\"http://127.0.0.1:8000\", timeout\u003d30, username\u003dNone, password\u003dNone):"},{"line_number":74,"context_line":"        self.log \u003d logging.getLogger(__name__)"},{"line_number":75,"context_line":"        self.client \u003d HttpClient(endpoint, timeout, username, password)"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_afecb5f3","line":73,"updated":"2019-04-10 20:14:02.000000000","message":"Would it maybe make more sense to pass in an \"auth\"-object instead of individual username/password. Might make extensions easier in the future (ie just pass in a custom auth object that requests support)","commit_id":"8db5eac7094220968bda98aa5f8065628017b345"},{"author":{"_account_id":9061,"name":"David Moreau Simard","email":"moi@dmsimard.com","username":"dmsimard"},"change_message_id":"c542526103b19bb9aa5c41272712fdcd4869935a","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"class AraHttpClient(object):"},{"line_number":73,"context_line":"    def __init__(self, endpoint\u003d\"http://127.0.0.1:8000\", timeout\u003d30, username\u003dNone, password\u003dNone):"},{"line_number":74,"context_line":"        self.log \u003d logging.getLogger(__name__)"},{"line_number":75,"context_line":"        self.client \u003d HttpClient(endpoint, timeout, username, password)"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_ba45aa19","line":73,"in_reply_to":"3fce034c_afecb5f3","updated":"2019-04-12 16:06:54.000000000","message":"Yeah. The requests docs [1] has different authentication implementations and it makes sense to leave things flexible enough to support them.\n\nWhat would the plumbing look like, though ?\nFor example, this patch adds two straightforward parameters to the callback and uses them when instanciating/getting a client.\n\nWould the creation of the auth object be done by the callback or by the client ? What kind of parameters do we want to pass through ?\n\n[1]: http://docs.python-requests.org/en/master/user/authentication/","commit_id":"8db5eac7094220968bda98aa5f8065628017b345"},{"author":{"_account_id":29199,"name":"Florian Apolloner","email":"florian@apolloner.eu","username":"apollo13"},"change_message_id":"8643cae23329afc3ee32cebd39a191e9cd7fc569","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"class AraHttpClient(object):"},{"line_number":73,"context_line":"    def __init__(self, endpoint\u003d\"http://127.0.0.1:8000\", timeout\u003d30, username\u003dNone, password\u003dNone):"},{"line_number":74,"context_line":"        self.log \u003d logging.getLogger(__name__)"},{"line_number":75,"context_line":"        self.client \u003d HttpClient(endpoint, timeout, username, password)"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_e8f60590","line":73,"in_reply_to":"3fce034c_ba45aa19","updated":"2019-04-13 10:16:02.000000000","message":"For now I\u0027d probably do the plumbing in the get_client function, so the classes operate on auth objects already","commit_id":"8db5eac7094220968bda98aa5f8065628017b345"}],"ara/plugins/action/ara_record.py":[{"author":{"_account_id":29199,"name":"Florian Apolloner","email":"florian@apolloner.eu","username":"apollo13"},"change_message_id":"2fed392489ba1519f26f1010a66603484962bc3f","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        timeout \u003d options[\"api_timeout\"]"},{"line_number":150,"context_line":"        username \u003d options[\"api_username\"]"},{"line_number":151,"context_line":"        password \u003d options[\"api_password\"]"},{"line_number":152,"context_line":"        self.client \u003d client_utils.get_client("},{"line_number":153,"context_line":"            client\u003dclient, endpoint\u003dendpoint, timeout\u003dtimeout, username\u003dusername, password\u003dpassword"},{"line_number":154,"context_line":"        )"},{"line_number":155,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_cf7ca122","line":152,"updated":"2019-04-10 20:14:02.000000000","message":"I\u0027d transform to an auth parameter here as mentioned in the previous files","commit_id":"8db5eac7094220968bda98aa5f8065628017b345"}]}
