Update oauth support for rails 3 version of oauth plugin

This commit is contained in:
Tom Hughes 2010-09-22 18:29:27 +01:00
parent a92223a506
commit 1e13e6ae2d
2 changed files with 6 additions and 2 deletions

View file

@ -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'

View file

@ -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