OAuth 1.0a and oauth_verifier

41 views
Skip to first unread message

Logan Allred

unread,
Jan 17, 2010, 9:12:37 AM1/17/10
to OAuth Objective-C
I am trying to get MPOAuth working with a service that uses 1.0a and
doesn't allow UIWebView. So far I have the callback URL working to
call a custom URL handler in my iPhone app and have extracted the
oauth_verifier token, but I can't figure out how to get the
oauth_verifier back into the access token request.

Does anyone have this working. What am I missing?

thanks,
Logan

Douglas Ryan Richardson

unread,
Jan 26, 2010, 1:15:53 PM1/26/10
to oauth-ob...@googlegroups.com
Hi Logan,

You can add oauth parameters like oauth_verifier to OAMutableURLRequest (part of OAuthConsumer framework, not MPOAuth). This code is currently in a branch, not top of trunk. You can see how to use it in the test case named testOptionalOAuthParameters here:

http://code.google.com/p/oauth/source/browse/branches/dougie.richardson-obj-c-patches/OAuthConsumer/OAMutableURLRequestTest.m

Doug

> --
> You received this message because you are subscribed to the Google Groups "OAuth Objective-C" group.
> To post to this group, send email to oauth-ob...@googlegroups.com.
> To unsubscribe from this group, send email to oauth-objectiv...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/oauth-objective-c?hl=en.
>

Karl Adam

unread,
Jan 27, 2010, 5:24:30 AM1/27/10
to oauth-ob...@googlegroups.com
Sorry for the late response guys. Doug, you should commit those patches to the trunk of OAuthConsumer.

Logan, there are two ways to do what you want. The first is to create a MPURLRequestParameter and manually ask the API to perform the URL request. The second way is to merely creating an NSURLRequest and pass that to MPOAuthAPI which will decompose the URLRequest and then put it back together after taking the necessary steps to add the oauth components to it.

Also, a patch has been submitted for MPOAuth to directly support oauthVerifier parameters, so soon you won't need to do any of the above.

_Karl

Douglas Ryan Richardson

unread,
Jan 30, 2010, 12:17:52 PM1/30/10
to oauth-ob...@googlegroups.com
Changes on are in the trunk now.
Reply all
Reply to author
Forward
0 new messages