summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2013-08-27 14:53:35 +0200
committerAzul <azul@leap.se>2013-08-27 14:57:44 +0200
commit147ccec989672f9b1314aa6dcc5ce8578e841370 (patch)
treed10f2c5732ad949f1c4adf8e215fd326d86447f9 /users
parent0b8df3c03f440147f36858246e1003a2d0e2e54a (diff)
do not redirect if no token present
So far we allow two mechanisms of authentication: * session based * token based If token fails session will be atempted in most cases. So we can't just redirect here or we get a double render error.
Diffstat (limited to 'users')
-rw-r--r--users/app/controllers/controller_extension/token_authentication.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/users/app/controllers/controller_extension/token_authentication.rb b/users/app/controllers/controller_extension/token_authentication.rb
index e1c92e7..82df314 100644
--- a/users/app/controllers/controller_extension/token_authentication.rb
+++ b/users/app/controllers/controller_extension/token_authentication.rb
@@ -2,7 +2,7 @@ module ControllerExtension::TokenAuthentication
extend ActiveSupport::Concern
def token_authenticate
- authenticate_or_request_with_http_token do |token_id, options|
+ authenticate_with_http_token do |token_id, options|
@token = Token.find(token_id)
end
User.find_by_param(@token.user_id) if @token