← Back to team overview

launchpad-dev team mailing list archive

Re: Problem using Launchpad API to retrieve the authenticated user

 

There's a fair amount of code already in place, but only a part of it is
involved in the OAuth workflow. The place where the request is being
signed, and the place where I've been focusing most of my own debugging
efforts, has been this file

https://github.com/notgary/ObjectiveC-LaunchpadLib/blob/master/ObjectiveC-LaunchpadLib/Launchpad.m

In here, on line 97, is a function called signRequest, which takes a
pointer to a request object and inserts the Authorization header.

The request is originally created in this file

https://github.com/notgary/ObjectiveC-LaunchpadLib/blob/master/ObjectiveC-LaunchpadLib/LaunchpadFactory.m

in the function called downloadJsonFromLaunchpad, where an unsigned GET
request is set up after being passed the url to which it should be sent, in
this case that's https://api.staging.launchpad.net/people/+me which is
being passed in from the function called manufactureAuthenticatedUser on
line 37 of this file

https://github.com/notgary/ObjectiveC-LaunchpadLib/blob/master/ObjectiveC-LaunchpadLib/Factories/PersonFactory.m

and that's where it all begins.

Hope that helps.

Chris


On 13 March 2013 23:39, William Grant <william.grant@xxxxxxxxxxxxx> wrote:

> On 14/03/13 10:17, Chris Wilson wrote:
> > Will it be a problem for you that it's written in Objective-C?
>
> I might not be able to run it, but I can probably see what it's doing.
>
>
>

Follow ups

References