fixed opener in oauth2, thanks Ignacio Ocampo
This commit is contained in:
@@ -121,7 +121,6 @@ commit:
|
|||||||
push:
|
push:
|
||||||
hg push
|
hg push
|
||||||
git push
|
git push
|
||||||
git push mdipierro
|
|
||||||
tag:
|
tag:
|
||||||
git tag -l '$(S)'
|
git tag -l '$(S)'
|
||||||
hg tag -l '$(S)'
|
hg tag -l '$(S)'
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
Version 2.4.1-alpha.2+timestamp.2013.01.01.19.08.01
|
Version 2.4.1-alpha.2+timestamp.2013.01.01.21.07.46
|
||||||
|
|||||||
@@ -115,19 +115,20 @@ server for requests. It can be used for the optional"scope" parameters for Face
|
|||||||
uri += '?' + urlencode(r.get_vars)
|
uri += '?' + urlencode(r.get_vars)
|
||||||
return uri
|
return uri
|
||||||
|
|
||||||
|
|
||||||
def __build_url_opener(self, uri):
|
def __build_url_opener(self, uri):
|
||||||
"""
|
"""
|
||||||
Build the url opener for managing HTTP Basic Athentication
|
Build the url opener for managing HTTP Basic Athentication
|
||||||
"""
|
"""
|
||||||
# Create an OpenerDirector with support
|
# Create an OpenerDirector with support
|
||||||
# for Basic HTTP Authentication...
|
# for Basic HTTP Authentication...
|
||||||
|
password_mgr = urllib2.HTTPPasswordMgrWithDefaultRealm()
|
||||||
auth_handler = urllib2.HTTPBasicAuthHandler()
|
password_mgr.add_password(realm=None,
|
||||||
auth_handler.add_password(None,
|
uri=uri,
|
||||||
uri,
|
user=self.client_id,
|
||||||
self.client_id,
|
passwd=self.client_secret)
|
||||||
self.client_secret)
|
handler = urllib2.HTTPBasicAuthHandler(password_mgr)
|
||||||
opener = urllib2.build_opener(auth_handler)
|
opener = urllib2.build_opener(handler)
|
||||||
return opener
|
return opener
|
||||||
|
|
||||||
def accessToken(self):
|
def accessToken(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user