README.rdoc in oauth-plugin-0.4.1 vs README.rdoc in oauth-plugin-0.5.0

- old
+ new

@@ -164,10 +164,17 @@ 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. +=== INSTALL RACK FILTER (NEW) + +A big change over previous versions is that we now use a rack filter. You have to install this in your config/environment.rb file: + + require 'oauth/rack/oauth_filter' + config.middleware.use OAuth::Rack::OAuthFilter + === Generator Options By default the generator generates RSpec and ERB templates. The generator can instead create Test::Unit and/or HAML templates. To do this use the following options: ./script/generate oauth_provider --test-unit --haml @@ -354,9 +361,13 @@ before_filter :login_or_oauth_required, :only => [:show,:index] If you have an action you only want used via oauth: before_filter :oauth_required + +You can also use this method in your controller: + + oauthenticate :strategies => :token , :interactive => false All of these places the tokens user in current_user as you would expect. It also exposes the following methods: * current_token - for accessing the token used to authorize the current request * current_client_application - for accessing information about which consumer is currently accessing your request