]> jfr.im git - z_archive/twitter.git/blobdiff - twitter/auth.py
If invalid values are passed for secrets, raise an exception with a helpful error...
[z_archive/twitter.git] / twitter / auth.py
index 77633fff6eca0b166a72b1c0ea8af75628b16bbc..45f1f4c001ae21df31a0aa904a5aad06aafaee97 100644 (file)
@@ -5,6 +5,7 @@ except ImportError:
     import urllib as urllib_parse
     from base64 import encodestring as encodebytes
 
+
 class Auth(object):
     """
     ABC for Authenticator objects.
@@ -21,6 +22,7 @@ class Auth(object):
         by the authentication scheme in use."""
         raise NotImplementedError()
 
+
 class UserPassAuth(Auth):
     """
     Basic auth authentication using email/username and
@@ -41,6 +43,7 @@ class UserPassAuth(Auth):
                 .encode('utf8')).strip(b'\n')
                 }
 
+
 class NoAuth(Auth):
     """
     No authentication authenticator.
@@ -53,3 +56,7 @@ class NoAuth(Auth):
 
     def generate_headers(self):
         return {}
+
+
+class MissingCredentialsError(Exception):
+    pass