stytch 3.6.0 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/stytch/passwords.rb +4 -6
- 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/passwords.rb
CHANGED
@@ -71,8 +71,8 @@ module Stytch
|
|
71
71
|
email:,
|
72
72
|
hash:,
|
73
73
|
hash_type:,
|
74
|
-
|
75
|
-
|
74
|
+
md_5_config: {},
|
75
|
+
argon_2_config: {}
|
76
76
|
)
|
77
77
|
request = {
|
78
78
|
email: email,
|
@@ -80,8 +80,8 @@ module Stytch
|
|
80
80
|
hash_type: hash_type
|
81
81
|
}
|
82
82
|
|
83
|
-
request[:
|
84
|
-
request[:
|
83
|
+
request[:md_5_config] = md_5_config unless md_5_config != {}
|
84
|
+
request[:argon_2_config] = argon_2_config unless argon_2_config != {}
|
85
85
|
|
86
86
|
post_request("#{PATH}/migrate", request)
|
87
87
|
end
|
@@ -99,7 +99,6 @@ module Stytch
|
|
99
99
|
email:,
|
100
100
|
login_redirect_url: nil,
|
101
101
|
reset_password_redirect_url: nil,
|
102
|
-
login_expiration_minutes: nil,
|
103
102
|
reset_password_expiration_minutes: nil,
|
104
103
|
attributes: {},
|
105
104
|
code_challenge: nil
|
@@ -110,7 +109,6 @@ module Stytch
|
|
110
109
|
|
111
110
|
request[:login_redirect_url] = login_redirect_url unless login_redirect_url.nil?
|
112
111
|
request[:reset_password_redirect_url] = reset_password_redirect_url unless reset_password_redirect_url.nil?
|
113
|
-
request[:login_expiration_minutes] = login_expiration_minutes unless login_expiration_minutes.nil?
|
114
112
|
unless reset_password_expiration_minutes.nil?
|
115
113
|
request[:reset_password_expiration_minutes] =
|
116
114
|
reset_password_expiration_minutes
|
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
|