stytch 3.8.0 → 3.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stytch/sessions.rb +11 -2
- data/lib/stytch/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93e1f89bed0f2c91f7caac140e7dc10b154d116eda9a0b89078f48336da15fcb
|
4
|
+
data.tar.gz: 736f9a25fd2e902024fab4ff5ce01eb21b26f8562d02236f6fc3f16bf37c63c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 345ddac68abf1011f6cca16fa1115b3b45bfe9067b6b66883bc3fb57aad5f374c9174333473cefaab5314175fe42aa2cf840d89cc6112c4ba95513b79cc7db50
|
7
|
+
data.tar.gz: 437f1988244668c730bef3106ebca258c6b4ed846ebceef93d186a38bc0ea97e39dff6d6dd129790935a6b170c9580aff7c9736c7f0e1aaf42c344d8e5e8d900
|
data/lib/stytch/sessions.rb
CHANGED
@@ -15,8 +15,17 @@ module Stytch
|
|
15
15
|
def initialize(connection, project_id)
|
16
16
|
@connection = connection
|
17
17
|
@project_id = project_id
|
18
|
-
@
|
19
|
-
|
18
|
+
@cache_last_update = 0
|
19
|
+
@jwks_loader = lambda do |options|
|
20
|
+
@cached_keys = nil if options[:invalidate] && @cache_last_update < Time.now.to_i - 300
|
21
|
+
@cached_keys ||= begin
|
22
|
+
@cache_last_update = Time.now.to_i
|
23
|
+
keys = []
|
24
|
+
jwks(project_id: @project_id)['keys'].each do |r|
|
25
|
+
keys << r
|
26
|
+
end
|
27
|
+
{ keys: keys }
|
28
|
+
end
|
20
29
|
end
|
21
30
|
end
|
22
31
|
|
data/lib/stytch/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stytch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- stytch
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|