diff options
author | Azul <azul@leap.se> | 2013-08-27 14:53:35 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2013-08-27 14:57:44 +0200 |
commit | 147ccec989672f9b1314aa6dcc5ce8578e841370 (patch) | |
tree | d10f2c5732ad949f1c4adf8e215fd326d86447f9 /users/app | |
parent | 0b8df3c03f440147f36858246e1003a2d0e2e54a (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/app')
-rw-r--r-- | users/app/controllers/controller_extension/token_authentication.rb | 2 |
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 |