+ return urllib_parse.urlencode(params)
+
+ def generate_headers(self):
+ return {b"Authorization": b"Basic " + encodebytes(
+ ("%s:%s" %(self.username, self.password))
+ .encode('utf8')).strip(b'\n')
+ }
+
+class NoAuth(Auth):
+ """
+ No authentication authenticator.
+ """
+ def __init__(self):
+ pass
+
+ def encode_params(self, base_url, method, params):
+ return urllib_parse.urlencode(params)