diff options
author | azul <azul@leap.se> | 2014-05-26 10:08:27 +0200 |
---|---|---|
committer | azul <azul@leap.se> | 2014-05-26 10:08:27 +0200 |
commit | 1d0d61389011a8d0d169bc139590d90a6fbbac60 (patch) | |
tree | 9746836914f455889af9e24fdff36a1241ef4b24 /test/integration/api/token_test.rb | |
parent | df298887221cffc8cacc8965d73a0d7850118849 (diff) | |
parent | 5764daae090227bf4c5967900b708392c967be47 (diff) |
Merge pull request #163 from azul/feature/3398-save-hashed-token
hash token with sha512 against timing attacs #3398
Diffstat (limited to 'test/integration/api/token_test.rb')
-rw-r--r-- | test/integration/api/token_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/integration/api/token_test.rb b/test/integration/api/token_test.rb new file mode 100644 index 0000000..ad3ac22 --- /dev/null +++ b/test/integration/api/token_test.rb @@ -0,0 +1,15 @@ +require 'test_helper' +require_relative 'srp_test' + +class TokenTest < SrpTest + + setup do + register_user + end + + test "stores token SHA512 encoded" do + authenticate + token = server_auth['token'] + assert Token.find(Digest::SHA512.hexdigest(token)) + end +end |