From 829665bd57198923dd9091cbe232ca78beeb1c88 Mon Sep 17 00:00:00 2001 From: Pelle Braendgaard Date: Sun, 14 Nov 2010 17:05:45 -0500 Subject: [PATCH] bumped version updated changelog --- CHANGELOG | 2 ++ README.rdoc | 47 +++++++++++++++++++++++++++++++++++++++-------- VERSION | 2 +- 3 files changed, 42 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d0298f1c..f4a0c9bd 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,10 +1,12 @@ 0.4.0 + - mongoid support in rails 3 [Alexander Semyonov] - OAUTH 2.0 authorization_code and password grant types - Supports OAuth 2.0 draft 10 (Note this is incompatible with previous drafts) - Refactored application_controller_methods to be a lot less intrusive - Increased default token and key size in anticipation of OAuth2 support - Rails 3 support - Rails 3 generators [Paul Rosiana] and patches by [Alexander Flatter] + - Modularized Rails 3 generators [Alexander Semyonov] - Callback urls now allow query parameters. Multiple patches but I used [Unk]'s. 10/08/2009 0.3.14 diff --git a/README.rdoc b/README.rdoc index 39ca72aa..b886f768 100644 --- a/README.rdoc +++ b/README.rdoc @@ -6,7 +6,7 @@ We support the revised OAuth 1.0a specs at: http://oauth.net/core/1.0a -As well as beginning support for OAuth 2.0: +As well as support for OAuth 2.0: http://tools.ietf.org/html/draft-ietf-oauth-v2-10 @@ -47,7 +47,34 @@ I think the only real issue is that the views have .html.erb extensions. So thes Please let me know if this works and I will see if I can make the generator conditionally create .rhtml for pre 2.0 versions of RAILS. -== OAuth Provider generator +== OAuth Provider generator (Rails 3) + +This currently supports rspec, test_unit, haml, erb, active_record and mongoid: + + rails g oauth_provider + +This generates OAuth and OAuth client controllers as well as the required models. + +It requires an authentication framework such as acts_as_authenticated, restful_authentication or restful_open_id_authentication. It also requires Rails 2.0. + +=== Generator Options + +The generator supports the defaults you have created in your application.rb file. eg: + + config.generators do |g| + g.orm :mongoid + g.template_engine :haml + g.test_framework :rspec + end + +=== User Model + +Add the following lines to your user model: + + has_many :client_applications + has_many :tokens, :class_name=>"OauthToken",:order=>"authorized_at desc",:include=>[:client_application] + +== OAuth Provider generator (Rails 2) While it isn't very flexible at the moment there is an oauth_provider generator which you can use like this: @@ -259,18 +286,24 @@ You could add application specific information to the OauthToken and ClientAppli The oauth_consumer generator creates a controller to manage the authentication flow between your application and any number of external OAuth secured applications that you wish to connect to. -To run it simply run: +To run it in Rails 3 simply run: + + rails g oauth_consumer + +In previous versions: ./script/generate oauth_consumer This generates the OauthConsumerController as well as the ConsumerToken model. -=== Generator Options +=== Generator Options (Rails 2) By default the generator generates ERB templates. The generator can instead create HAML templates. To do this use the following options: ./script/generate oauth_consumer --haml +Rails 3 respects your application defaults, see the oauth provider generator section above for more info. + === Configuration All configuration of applications is done in @@ -319,7 +352,7 @@ eg. If you connect to Yahoo's FireEagle you would add the :fire_eagle entry to O This allows you to add a has_one association in your user model: - has_one :fire_eagle,:class_name=>"FireEagleToken", :dependent=>:destroy + has_one :fire_eagle, :class_name=>"FireEagleToken", :dependent=>:destroy And you could do: @@ -363,8 +396,6 @@ Run them as any other normal migration in rails with: == More -The Google Code project is http://code.google.com/p/oauth-plugin/ - The Mailing List for all things OAuth in Ruby is: http://groups.google.com/group/oauth-ruby @@ -377,4 +408,4 @@ The OAuth Ruby Gem home page is http://oauth.rubyforge.org Please help documentation, patches and testing. -Copyright (c) 2007-2009 Pelle Braendgaard, released under the MIT license \ No newline at end of file +Copyright (c) 2007-2010 Pelle Braendgaard and contributors, released under the MIT license \ No newline at end of file diff --git a/VERSION b/VERSION index 0010ffef..9756d4f9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.14 \ No newline at end of file +0.4.pre-1 \ No newline at end of file