public
Fork of pelle/oauth
Description: OAuth for Ruby
Homepage: http://oauth.rubyforge.org/
Clone URL: git://github.com/mojodna/oauth.git
oauth /
name age message
file History.txt Mon Sep 14 12:08:23 -0700 2009 0.3.6 release [mojodna]
file License.txt Mon Jan 21 11:13:42 -0800 2008 Changes from http://oauth.googlecode.com/svn/co... [pelle]
file Manifest.txt Tue Apr 21 19:21:05 -0700 2009 Improve error handling for imperfect authorizat... [Matt Sanford]
file README.rdoc Mon Mar 23 13:55:52 -0700 2009 0.3.2 release [mojodna]
file Rakefile Tue Sep 08 17:16:33 -0700 2009 Explicitly require Hoe so that rake can run [Xavier Shay]
file TODO Sun May 03 21:18:39 -0700 2009 Remove TODO that is TODONE and update History [Matt Sanford]
directory bin/ Sun May 03 21:00:50 -0700 2009 display warnings and require rubygems [mojodna]
directory examples/ Mon May 18 13:40:15 -0700 2009 removed unused assignment [mojodna]
directory lib/ Mon Sep 14 12:08:23 -0700 2009 0.3.6 release [mojodna]
file oauth.gemspec Mon Sep 14 12:08:23 -0700 2009 0.3.6 release [mojodna]
directory script/ Wed Jan 21 20:49:22 -0800 2009 bumped version to 0.2.99 [mojodna]
file setup.rb Mon Nov 26 22:10:32 -0800 2007 First commit [pelle]
directory tasks/ Tue Sep 09 10:39:37 -0700 2008 Updated deployment info to be 0.2.6 [pelle]
directory test/ Tue Sep 08 17:22:12 -0700 2009 Fix test_action_controller_request_proxy to use... [pelle]
directory website/ Wed Jun 03 09:52:02 -0700 2009 0.3.5 release [mojodna]
README.rdoc

Ruby OAuth GEM

What

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

See the OAuth specs oauth.net/core/1.0/

Installing

  sudo gem install oauth

You can also install it from the oauth rubyforge project rubyforge.org/projects/oauth/.

The source code is now hosted on the OAuth GitHub Project github.com/mojodna/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 code.google.com/p/oauth-plugin/ which now requires this GEM.

Demonstration of usage

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

  @consumer = OAuth::Consumer.new("key","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')

For more detailed instructions I have written this OAuth Client Tutorial stakeventures.com/articles/2008/02/23/developing-oauth-clients-in-ruby and "How to turn your rails site into an OAuth Provider ":stakeventures.com/articles/2007/11/26/how-to-turn-your-rails-site-into-an-oauth-provider .

Finally be sure to check out the OAuth RDoc Manual oauth.rubyforge.org/rdoc/ .

Documentation Wiki

There is some documentation on the Google Code project for the "OAuth Rails Plugin":code.google.com/p/oauth-plugin/ :

Forum

groups.google.com/group/oauth-ruby

How to submit patches

Read the "8 steps for fixing other people’s code" drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/.

The source code is now hosted on the OAuth GitHub Project github.com/mojodna/oauth

To submit a patch, please fork the oauth project and create a patch with tests. Once you’re happy with it send a pull request and post a message to the google group.

License

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

Contact

Comments are welcome. Send an email to "Pelle Braendgaard" pelleb@gmail.com email via the OAuth Ruby mailing list groups.google.com/group/oauth-ruby