From 1e13e6ae2d5326d93ec3c55daaac08d884d69265 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 22 Sep 2010 18:29:27 +0100 Subject: [PATCH] Update oauth support for rails 3 version of oauth plugin --- Gemfile | 2 +- app/controllers/application_controller.rb | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 7e356e554..81a543eae 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,7 @@ gem 'pg' gem 'libxml-ruby', '>= 2.0.5', :require => 'libxml' gem 'rmagick', :require => 'RMagick' gem 'oauth', '>= 0.4.3' -gem 'oauth-plugin', '>= 0.3.14' +gem 'oauth-plugin', '> 0.3.14' gem 'httpclient' gem 'SystemTimer', '>= 1.1.3', :require => 'system_timer' gem 'sanitize' diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 5018dcc42..e22f64c76 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -106,7 +106,7 @@ class ApplicationController < ActionController::Base # is optional. def setup_user_auth # try and setup using OAuth - if oauthenticate + if Authenticator.new(self, [:token]).allow? @user = current_token.user else username, passwd = get_auth_data # parse from headers @@ -358,4 +358,8 @@ private return [user, pass] end + # override to stop oauth plugin sending errors + def invalid_oauth_response + end + end -- 2.43.2