Ruby OAuth GEM

Get Version

0.1.1

What

This is a RubyGem for implementing both OAuth clients and servers in Ruby applications.

See the OAuth specs

Installing

sudo gem install oauth

The basics

This is a ruby library which is intended to be used in creating Ruby Consumer and Service Provider applications. It is NOT a Rails plugin, but could easily be used for the foundation for such a Rails plugin.

As a matter of fact it has been pulled out from an OAuth Rails Plugin which in the future will require this GEM.

Demonstration of usage

Create a new consumer instance by passing it a configuration hash:

@consumer=OAuth::Consumer.new( {
    :consumer_key=>"key",
    :consumer_secret=>"secret",
    :site=>"https://agree2" 
    })

Start the process by requesting a token

@request_token=@consumer.get_request_token
session[:request_token]=@request_token
redirect_to @request_token.authorize_url

When user returns create an access_token

@access_token=@request_token.get_access_token
@photos=@access_token.get('/photos.xml')

Documentation Wiki

There is some documentation on the Google Code project for the OAuth Rails Plugin :

Forum

http://groups.google.com/group/oauth-ruby

How to submit patches

Read the 8 steps for fixing other people’s code and for section 8b: Submit patch to Google Groups, use the Google Group above.

The trunk repository is svn://rubyforge.org/var/svn/oauth/trunk for anonymous access.

License

This code is free to use under the terms of the MIT license.

Contact

Comments are welcome. Send an email to Pelle Braendgaard email via the forum

FIXME full name, 26th November 2007
Theme extended from Paul Battley