jwt_sessions 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e7a3aefe57092b27b60f6ef28e6a2acb55f6a18228984b2ca4b08c3e7b887e7
4
- data.tar.gz: 75eda3e6ec9a47dae19f03a00c0b3e30a99f0f4548b37aae6815aa9e808126d9
3
+ metadata.gz: 7d38f64697988a31f87a3e1b4e95910f821a24fc0c35cea614b9d4a72f16a0a5
4
+ data.tar.gz: 4b1aecccf844e0d7dc4de866c03b9af136b9b422e7e3caf4ffb4138517e6e771
5
5
  SHA512:
6
- metadata.gz: 8d2eb29176309d00726b1e7df7d7ace1f914c62c9998b2655f754d9c4992d75bd5db3d54183034c80be889fd43216bc1b548ccbcf52104eea216621923dc6d8e
7
- data.tar.gz: 5c7ba9621534b445373b2b588b4be2076c2ed7e4266852aea1d653b51f166c85bec1f6de33b9a6445de049e081cb93356d5e92980887849d209a03e39d1b54d9
6
+ metadata.gz: 075e7f3b2dc0ebf798ab8696ad715badb95d0f485dbf6dc62d059055a65283d11e1250db541c7b90249055bc4424946a8bfcfc916d23c4afdb8d06958b1f52f3
7
+ data.tar.gz: cec03faa24c671b234022742a59689f07c4bd50105a286b03c3b7b1535134c8f95d69c0a29ee47d0d47385590071134d1c82844bdfa6bb2882108b88956f6a47
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 3.0.1 (December 28, 2022)
2
+
3
+ Support:
4
+
5
+ - fix bug with expire/expireat
6
+
1
7
  ## 3.0.0 (December 27, 2022)
2
8
 
3
9
  Features:
@@ -32,7 +32,8 @@ module JWTSessions
32
32
 
33
33
  def persist_access(uid, csrf, expiration)
34
34
  key = access_key(uid)
35
- storage.call("SET", key, csrf, ex: expiration)
35
+ storage.call("SET", key, csrf)
36
+ storage.call("EXPIREAT", key, expiration)
36
37
  end
37
38
 
38
39
  def fetch_refresh(uid, namespace, first_match = false)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JWTSessions
4
- VERSION = "3.0.0"
4
+ VERSION = "3.0.1"
5
5
  end
@@ -90,4 +90,13 @@ class TestRedisStoreAdapter < Minitest::Test
90
90
  adapter = JWTSessions::StoreAdapters::RedisStoreAdapter.new(pool_size: 10)
91
91
  assert_equal 10, adapter.storage.instance_variable_get(:@pool).size
92
92
  end
93
+
94
+ def test_persist_access
95
+ adapter = JWTSessions::StoreAdapters::RedisStoreAdapter.new
96
+ expire_at = Time.now.to_i + 10
97
+ adapter.persist_access("test_access_token_exp", "test_csrf", expire_at)
98
+ ttl = adapter.storage.call("TTL", "jwt__access_test_access_token_exp")
99
+ assert_operator ttl, :<=, 10
100
+ adapter.storage.call("DEL", "jwt__access_test_access_token_exp")
101
+ end
93
102
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jwt_sessions
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yulia Oletskaya
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-27 00:00:00.000000000 Z
11
+ date: 2022-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt