fixed opener in oauth2, thanks Ignacio Ocampo
This commit is contained in:
1
Makefile
1
Makefile
@@ -121,7 +121,6 @@ commit:
|
||||
push:
|
||||
hg push
|
||||
git push
|
||||
git push mdipierro
|
||||
tag:
|
||||
git tag -l '$(S)'
|
||||
hg tag -l '$(S)'
|
||||
|
||||
2
VERSION
2
VERSION
@@ -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)
|
||||
return uri
|
||||
|
||||
|
||||
def __build_url_opener(self, uri):
|
||||
"""
|
||||
Build the url opener for managing HTTP Basic Athentication
|
||||
"""
|
||||
# Create an OpenerDirector with support
|
||||
# for Basic HTTP Authentication...
|
||||
|
||||
auth_handler = urllib2.HTTPBasicAuthHandler()
|
||||
auth_handler.add_password(None,
|
||||
uri,
|
||||
self.client_id,
|
||||
self.client_secret)
|
||||
opener = urllib2.build_opener(auth_handler)
|
||||
password_mgr = urllib2.HTTPPasswordMgrWithDefaultRealm()
|
||||
password_mgr.add_password(realm=None,
|
||||
uri=uri,
|
||||
user=self.client_id,
|
||||
passwd=self.client_secret)
|
||||
handler = urllib2.HTTPBasicAuthHandler(password_mgr)
|
||||
opener = urllib2.build_opener(handler)
|
||||
return opener
|
||||
|
||||
def accessToken(self):
|
||||
|
||||
Reference in New Issue
Block a user