Retrieving contents of response URL

32 views
Skip to first unread message

KRiggle

unread,
Jun 6, 2012, 6:33:22 PM6/6/12
to GTM OAuth 1 Discussion
I'm authenticating with a service. Everything is working fine, but I
need to retrieve data that comes back from in the requestURL after
authorization. The data returned looks like this:

<NSMutableURLRequest
http://www.example.com/OAuthCallback?username=KRiggle&oauth_token=8S2teIIS1qJqh5yjoH4WiYKONoNSatVcRQJByl77&oauth_verifier=un5JEaRva1dJHZchDGbx>

How should I be retrieving the username? It seems that in
GTMOAuthAuthentication, setKeysForResponseString processes the data
and username is dropped. username is not needed for authorization,
but it is needed by me for future api calls.

By the time my callback happens, that string has been processed and
username is lost in the noise.

Thanks,
Kathie

David Phillip Oster

unread,
Jun 6, 2012, 7:06:52 PM6/6/12
to gtm-...@googlegroups.com
I just use the userEmail property of the GTMOAuth2Authentication object.

KRiggle

unread,
Jun 6, 2012, 7:25:50 PM6/6/12
to GTM OAuth 1 Discussion
David,

Thanks for the response. I'm using Oauth 1, but it looks like the
same thing.

I did try that and it works, but I was hoping there was a way to avoid
changing that code. I thought I might be overlooking something simple!
I suppose I can just overwrite that method.

Thanks,
Kathie



On Jun 6, 4:06 pm, David Phillip Oster <davidphillipos...@gmail.com>
wrote:
> I just use the *userEmail* property of the *GTMOAuth2Authentication* object.
>
>
>
>
>
>
>
> On Wed, Jun 6, 2012 at 3:33 PM, KRiggle <katrig...@gmail.com> wrote:
> > I'm authenticating with a service.  Everything is working fine, but I
> > need to retrieve data that comes back from in the requestURL after
> > authorization.  The data returned looks like this:
>
> > <NSMutableURLRequest
>
> >http://www.example.com/OAuthCallback?username=KRiggle&oauth_token=8S2...
Reply all
Reply to author
Forward
0 new messages