summaryrefslogtreecommitdiff
path: root/app/controllers/controller_extension
diff options
context:
space:
mode:
authorazul <azul@leap.se>2014-05-26 10:08:27 +0200
committerazul <azul@leap.se>2014-05-26 10:08:27 +0200
commit1d0d61389011a8d0d169bc139590d90a6fbbac60 (patch)
tree9746836914f455889af9e24fdff36a1241ef4b24 /app/controllers/controller_extension
parentdf298887221cffc8cacc8965d73a0d7850118849 (diff)
parent5764daae090227bf4c5967900b708392c967be47 (diff)
Merge pull request #163 from azul/feature/3398-save-hashed-token
hash token with sha512 against timing attacs #3398
Diffstat (limited to 'app/controllers/controller_extension')
-rw-r--r--app/controllers/controller_extension/token_authentication.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/controller_extension/token_authentication.rb b/app/controllers/controller_extension/token_authentication.rb
index 6e0a6ce..b0ed624 100644
--- a/app/controllers/controller_extension/token_authentication.rb
+++ b/app/controllers/controller_extension/token_authentication.rb
@@ -2,8 +2,8 @@ module ControllerExtension::TokenAuthentication
extend ActiveSupport::Concern
def token
- @token ||= authenticate_with_http_token do |token_id, options|
- Token.find(token_id)
+ @token ||= authenticate_with_http_token do |token, options|
+ Token.find_by_token(token)
end
end