He is a copy of my Oauth presentation [806 kB] from tonight’s WellRailed group. I discussed Oauth from both a client and a server perspective. Plenty of examples from Sharesight, where we are building an API.
Here is the example test.rb
require 'rubygems'
require 'oauth'
require 'pp'
###################
# Authorisation
###################
@consumer = OAuth::Consumer.new("FDcyJ3ZrVlJhEuI4mOtC", "ytjnPDxT8QGi2f7YHlswJLoCWsQ3SGubmwVojJlx", :site => 'http://localhost:3000')
@request_token = @consumer.get_request_token
puts "Authorise url: #{@request_token.authorize_url}"
`open #{@request_token.authorize_url}`
puts "Enter OAuth verifier:"
@oauth_verifier = gets.strip
@access_token = @request_token.get_access_token(:oauth_verifier => @oauth_verifier)
###################
# Use
###################
@response = @access_token.get '/api/trades.xml'
pp @response.body
I also discussed LoadStorm.com, which has a free plan that allows up to 50 simultaneous users. I recommend you check them out.