RFE: use login/password to create a temporary cookie
Bug #181138 reported by
Markus Korn
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-launchpad-bugs |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
authentication in py-lp-bugs currently works with the help of a valid mozilla cookie-file, like
Bug.authentication = <path to cookie-file>
It would be nice to have a mozilla and path independent solution like:
Bug.authentication = {"email":<email of lp-user>, "password"
Related branches
To post a comment you must log in.
Fixed in my py-lp-bugs text.dev branch rev 100.
Example usage: markus/ .mozilla/ firefox/ foobarbaz. default/ cookies. txt" ","password" :"***"}
[...]
Bug.authentication = "/home/
or
Bug.authentication = {"email":"<email address hidden>
[...]
Test case: http_connection import HTTPConnection
In [8]: from launchpadbugs.
In [9]: c = HTTPConnection()
In [10]: try: /bugs.edge. launchpad. net/python- launchpad- bugs/+filebug") /bugs.edge. launchpad. net/python- launchpad- bugs/+filebug'
....: c.get("https:/
....: except Exception, e:
....: print e
....:
....:
'login failed https:/
In [11]: c.set_auth( "/home/ markus/ .gnome2/ epiphany/ mozilla/ epiphany/ cookies. txt")
Out[11]: False
In [12]: c.get("https:/ /bFixed in my py-lp-bugs text.dev branch rev 100.
Example usage: markus/ .mozilla/ firefox/ foobarbaz. default/ cookies. txt" ","password" :"***"}
[...]
Bug.authentication = "/home/
or
Bug.authentication = {"email":"<email address hidden>
[...]
Test case: http_connection import HTTPConnection
In [8]: from launchpadbugs.
In [9]: c = HTTPConnection()
In [10]: try: /bugs.edge. launchpad. net/python- launchpad- bugs/+filebug") /bugs.edge. launchpad. net/python- launchpad- bugs/+filebug'
....: c.get("https:/
....: except Exception, e:
....: print e
....:
....:
'login failed https:/
In [11]: c.set_auth( "/home/ markus/ .gnome2/ epiphany/ mozilla/ epiphany/ cookies. txt")
Out[11]: False
In [12]: c.get("https:/ /bugs.edge. launchpad. net/python- launchpad- bugs/+filebug") http_connection ._result object at 0x152e4d0>
Out[12]: <launchpadbugs.
In [13]: c = HTTPConnection()
In [14]: c.set_auth( {"email" :"<email address hidden> ","password" :"***** ****"})
In [15]: c.get("https:/ /bugs.edge. launchpad. net/python- launchpad- bugs/+filebug") http_connection ._result object at 0x152e950>
Out[15]: <launchpadbugs.
Markusugs. edge.launchpad. net/python- launchpad- bugs/+filebug" ) http_connection ._result object at 0x152e4d0>
Out[12]: <launchpadbugs.
In [13]: c = HTTPConnection()
In [14]: c.set_auth( {"email" :"<email address hidden> ","password" :"***** ****"})
In [15]: c.get("https:/ /bugs.edge. launchpad. net/python- launchpad- bugs/+filebug") http_connection ._result object at 0x152e950>
Out[15]: <launchpadbugs.
Markus