KrishnaReddyGuda / sfdc-oauth-playground

Automatically exported from code.google.com/p/sfdc-oauth-playground
0 stars 0 forks source link

Support Two-Legged OAuth #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'd like to be able to use the playground with SimpleGeo - they use two-legged 
OAuth 1.0a, described at 
http://developers.simplegeo.com/blog/2011/01/07/two-legged-oauth/

According to that blog entry, I should be able to make requests using my 
consumer key and secret, and just use empty strings for access token and 
secret. Currently, the playground doesn't like this - if I configure consumer 
key/secret (and no URLs or authorizations) and try a GET on 
http://api.simplegeo.com/1.0/context/ip.json in the API tester, I get an error:

User xxx@example.com did not authorize access to SimpleGeo. Redirect user to 
authorization page. [System.QueryException: List has no rows for assignment to 
SObject]

Is it a simple change to use an empty access token and secret if there are no 
authorizations? Or maybe, if that's a little fast and loose, have a checkbox 
for two-legged OAuth in the OAuth Service?

I'm thinking it's probably a 5 minute change to get this working, but, if 
you're busy, contact me out-of-band and I'll have a crack at this myself... In 
case you haven't guessed, it's Pat Patterson at SFDC :-)

Original issue reported on code.google.com by metada...@gmail.com on 20 Jan 2011 at 9:56

GoogleCodeExporter commented 9 years ago
Patch attached to use two-legged OAuth if there are no authorizations for a 
service. It's a minimal way to get two-legged OAuth working.

Original comment by metada...@gmail.com on 24 Jan 2011 at 4:26

Attachments: