Comment 13 for bug 387297

Revision history for this message
Leonard Richardson (leonardr) wrote : Re: manage-credentials should not ask for Launchpad password directly

OK, I've written a launchpadlib branch that includes two scripts:

1. launchpad-request-token: acquires a request token
2. launchpad-credentials-console: gets the user's password and trades a request token for an access token

I wrote #1 for my own testing purposes, but it's generally useful and will stop people from reinventing the wheel. #2 is the script that I described above.

The main problem with launchpad-credentials-console is that it's talking to a website rather than a web service. There are several places where I have to infer what happened by scanning the HTML for keywords rather than relying on status codes. This makes the script fragile in the face of redesigns, even if we keep the URL format and the forms the same.

The branches are here:

https://code.edge.launchpad.net/~leonardr/launchpad/oauth-json-description
https://code.edge.launchpad.net/~leonardr/launchpadlib/trusted-client