stytch 10.16.0 → 10.17.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/b2b_sessions.rb +5 -2
- data/lib/stytch/m2m.rb +5 -2
- data/lib/stytch/sessions.rb +5 -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: 111462e345fe52ad3693fc599d4534832028d8e52c1626d159353060119c1b23
|
4
|
+
data.tar.gz: 1a1032562e9ed90a8f17f062a6c3ad3be7b9ea74133467c1a9a3f8e67e58427b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b1792dcf36aad3226ec09c1b850888939f67e3e6a00b2a353f6a2e3ecb56707ab8187a79baf1887922113dbd3dced62cd23805f6cdde22675f7a0d1e943c440
|
7
|
+
data.tar.gz: 0fb41b4b5477dcfed44254599be3b0fc33b8fc49f54c4a16c6aeb3a462e131f91a9670c8b4066168351c73732adc7ee35bc4ac32e0c5b4fee2ec85b4e36a047c
|
data/lib/stytch/b2b_sessions.rb
CHANGED
@@ -582,10 +582,13 @@ module StytchB2B
|
|
582
582
|
max_token_age_seconds = 300 if max_token_age_seconds.nil?
|
583
583
|
clock_tolerance_seconds = 0 if clock_tolerance_seconds.nil?
|
584
584
|
|
585
|
-
|
585
|
+
default_issuer = 'stytch.com/' + @project_id
|
586
|
+
base_url_issuer = @connection.api_host
|
587
|
+
valid_issuers = [default_issuer, base_url_issuer]
|
588
|
+
|
586
589
|
begin
|
587
590
|
decoded_token = JWT.decode session_jwt, nil, true,
|
588
|
-
{ jwks: @jwks_loader, iss:
|
591
|
+
{ jwks: @jwks_loader, iss: valid_issuers, verify_iss: true, aud: @project_id, verify_aud: true, algorithms: ['RS256'], nbf_leeway: clock_tolerance_seconds }
|
589
592
|
|
590
593
|
session = decoded_token[0]
|
591
594
|
iat_time = Time.at(session['iat']).to_datetime
|
data/lib/stytch/m2m.rb
CHANGED
@@ -184,10 +184,13 @@ module Stytch
|
|
184
184
|
# If clock_tolerance_seconds is not supplied 0 seconds will be used as the default.
|
185
185
|
def authenticate_token_local(jwt, clock_tolerance_seconds: nil)
|
186
186
|
clock_tolerance_seconds = 0 if clock_tolerance_seconds.nil?
|
187
|
-
|
187
|
+
default_issuer = 'stytch.com/' + @project_id
|
188
|
+
base_url_issuer = @connection.api_host
|
189
|
+
valid_issuers = [default_issuer, base_url_issuer]
|
190
|
+
|
188
191
|
begin
|
189
192
|
decoded_token = JWT.decode jwt, nil, true,
|
190
|
-
{ jwks: @jwks_loader, iss:
|
193
|
+
{ jwks: @jwks_loader, iss: valid_issuers, verify_iss: true, aud: @project_id, verify_aud: true, algorithms: ['RS256'], nbf_leeway: clock_tolerance_seconds }
|
191
194
|
decoded_token[0]
|
192
195
|
rescue JWT::InvalidIssuerError
|
193
196
|
raise JWTInvalidIssuerError
|
data/lib/stytch/sessions.rb
CHANGED
@@ -384,10 +384,13 @@ module Stytch
|
|
384
384
|
max_token_age_seconds = 300 if max_token_age_seconds.nil?
|
385
385
|
clock_tolerance_seconds = 0 if clock_tolerance_seconds.nil?
|
386
386
|
|
387
|
-
|
387
|
+
default_issuer = 'stytch.com/' + @project_id
|
388
|
+
base_url_issuer = @connection.api_host
|
389
|
+
valid_issuers = [default_issuer, base_url_issuer]
|
390
|
+
|
388
391
|
begin
|
389
392
|
decoded_token = JWT.decode session_jwt, nil, true,
|
390
|
-
{ jwks: @jwks_loader, iss:
|
393
|
+
{ jwks: @jwks_loader, iss: valid_issuers, verify_iss: true, aud: @project_id, verify_aud: true, algorithms: ['RS256'], nbf_leeway: clock_tolerance_seconds }
|
391
394
|
|
392
395
|
session = decoded_token[0]
|
393
396
|
iat_time = Time.at(session['iat']).to_datetime
|
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: 10.
|
4
|
+
version: 10.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- stytch
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-04-
|
11
|
+
date: 2025-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|