Skip to content

Instantly share code, notes, and snippets.

@johnreilly
Created August 6, 2009 16:33
Show Gist options
  • Save johnreilly/163412 to your computer and use it in GitHub Desktop.
Save johnreilly/163412 to your computer and use it in GitHub Desktop.
Broken:
----------------------------------
def self.url(key, secret, email, name, uid, additional_fields={})
consumer = OAuth::Consumer.new(key, secret)
uri = URI.parse("https://#{DOMAIN}/fastpass")
...
end
Generates this url:
https://getsatisfaction.com/fastpass?email=jr%2Btrmstest%40trms.com&name=trmstest&oauth_consumer_key=rakdrg10995k&oauth_nonce=vbS27Iv3jhThzbgyCahirBi1cuyjeeqcDKSYn2YY&oauth_signature=doYBa7WzSPnwzeWmAqiH%2Frr3e3M%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1249576107&oauth_version=1.0&phone=866-866-4118&real_name=trmstest&uid=85295e67
Which returns this in the debugger:
* Consumer Key was correct
* Consumer Key has Fastpass access
* Fastpass signature was invalid
Working:
----------------------------------
def self.url(key, secret, email, name, uid, additional_fields={})
consumer = OAuth::Consumer.new(key, secret)
uri = URI.parse("http://#{DOMAIN}/fastpass")
...
end
Generates this url:
http://getsatisfaction.com/fastpass?email=jr%2Btrmstest%40trms.com&name=trmstest&oauth_consumer_key=rakdrg10995k&oauth_nonce=gdjmMbJHQzttnRTbIHFnLEoqiGV9eQFE6SWD959Qy4&oauth_signature=OQTAf6h9Sy1S5WoBpty2%2BoWTkgc%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1249576276&oauth_version=1.0&phone=866-866-4118&real_name=trmstest&uid=85295e67
Which returns this in the debugger:
* Fastpass URL was valid
* User account was successfully found
* Consumer Key was correct
* Consumer Key has Fastpass access
Extracted Data
--- !map:HashWithIndifferentAccess
name: trmstest
real_name: trmstest
uid: 85295e67
phone: 866-866-4118
email: jr+trmstest@trms.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment