Update oauth support for rails 3 version of oauth plugin
This commit is contained in:
parent
a92223a506
commit
1e13e6ae2d
2 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue