summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/app/controllers/controller_extension/token_authentication.rb2
-rw-r--r--users/test/support/auth_test_helper.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/users/app/controllers/controller_extension/token_authentication.rb b/users/app/controllers/controller_extension/token_authentication.rb
index 3e2816d..530294a 100644
--- a/users/app/controllers/controller_extension/token_authentication.rb
+++ b/users/app/controllers/controller_extension/token_authentication.rb
@@ -5,7 +5,7 @@ module ControllerExtension::TokenAuthentication
authenticate_with_http_token do |token_id, options|
@token = Token.find(token_id)
end
- @token.user if @token
+ @token.authenticate if @token
end
def logout
diff --git a/users/test/support/auth_test_helper.rb b/users/test/support/auth_test_helper.rb
index 47147fc..609f115 100644
--- a/users/test/support/auth_test_helper.rb
+++ b/users/test/support/auth_test_helper.rb
@@ -41,7 +41,7 @@ module AuthTestHelper
protected
def header_for_token_auth
- @token = find_record(:token, :user => @current_user)
+ @token = find_record(:token, :authenticate => @current_user)
ActionController::HttpAuthentication::Token.encode_credentials @token.id
end
end