Auth handlers should use HTTPS by default.
authorJoshua Roesslein <jroesslein@gmail.com>
Thu, 16 Jan 2014 02:53:46 +0000 (18:53 -0800)
committerJoshua Roesslein <jroesslein@gmail.com>
Thu, 16 Jan 2014 02:53:46 +0000 (18:53 -0800)
tweepy/auth.py

index 123ada54b911fe21b386283f6cf71442f730507c..29df5b21611e4e699fd2760da134c59ab9153614 100644 (file)
@@ -27,7 +27,7 @@ class OAuthHandler(AuthHandler):
     OAUTH_HOST = 'api.twitter.com'
     OAUTH_ROOT = '/oauth/'
 
-    def __init__(self, consumer_key, consumer_secret, callback=None, secure=False):
+    def __init__(self, consumer_key, consumer_secret, callback=None, secure=True):
         if type(consumer_key) == unicode:
             consumer_key = bytes(consumer_key)
 
@@ -42,7 +42,7 @@ class OAuthHandler(AuthHandler):
         self.username = None
         self.secure = secure
 
-    def _get_oauth_url(self, endpoint, secure=False):
+    def _get_oauth_url(self, endpoint, secure=True):
         if self.secure or secure:
             prefix = 'https://'
         else: