Removed basic auth
authorAaron Hill <aa1ronham@gmail.com>
Fri, 16 Aug 2013 19:27:54 +0000 (15:27 -0400)
committerAaron Hill <aa1ronham@gmail.com>
Fri, 16 Aug 2013 19:27:54 +0000 (15:27 -0400)
examples/basic_auth.py [deleted file]
tweepy/auth.py

diff --git a/examples/basic_auth.py b/examples/basic_auth.py
deleted file mode 100644 (file)
index 990a24e..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-import tweepy
-
-# === Basic Authentication ===
-#
-# *Note: Basic Authentication is deprecated and no longer supported on Twitter.
-#      It is still provided for use in services like Status.net which still suppports it.*
-#
-# This mode of authentication requires the user provide their username and plain text password.
-# These credentials will then be provided for each request to the API for authentication.
-
-# You would normally fetch this in your application
-# by asking the user or loading from some dark place.
-username = ""
-password = ""
-
-# Create an authentication handler passing it the username and password.
-# We will use this object later on when creating our API object.
-auth = tweepy.auth.BasicAuthHandler(username, password)
-
-# Create the API object providing it the authentication handler to use.
-# Each request will then be authenticated using this handler.
-api = tweepy.API(auth)
-
-api.update_status('Updating using basic authentication via Tweepy!')
-
index 27890aa439c1cc230bc0633969b84c36a2a9f62b..e545883961ccac985aceb327692c6273d9c82cf4 100644 (file)
@@ -21,19 +21,6 @@ class AuthHandler(object):
         raise NotImplementedError
 
 
-class BasicAuthHandler(AuthHandler):
-
-    def __init__(self, username, password):
-        self.username = username
-        self._b64up = base64.b64encode('%s:%s' % (username, password))
-
-    def apply_auth(self, url, method, headers, parameters):
-        headers['Authorization'] = 'Basic %s' % self._b64up
-
-    def get_username(self):
-        return self.username
-
-
 class OAuthHandler(AuthHandler):
     """OAuth authentication handler"""