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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d38f64697988a31f87a3e1b4e95910f821a24fc0c35cea614b9d4a72f16a0a5
|
4
|
+
data.tar.gz: 4b1aecccf844e0d7dc4de866c03b9af136b9b422e7e3caf4ffb4138517e6e771
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 075e7f3b2dc0ebf798ab8696ad715badb95d0f485dbf6dc62d059055a65283d11e1250db541c7b90249055bc4424946a8bfcfc916d23c4afdb8d06958b1f52f3
|
7
|
+
data.tar.gz: cec03faa24c671b234022742a59689f07c4bd50105a286b03c3b7b1535134c8f95d69c0a29ee47d0d47385590071134d1c82844bdfa6bb2882108b88956f6a47
|
data/CHANGELOG.md
CHANGED
@@ -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
|
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)
|
data/lib/jwt_sessions/version.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2022-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|