stytch 10.37.0 → 10.37.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2636f56ed7d78577fb1ff81133a92fc1c0fb2500696f7921dcff85d6e79d7995
4
- data.tar.gz: 932c0aa9dcef45bfb75a82516508bceac612f89a4b4a55e1555103017f80ba55
3
+ metadata.gz: 3653299404a1b88944fb791d6a44dcea978101d02419baf6333385721f768ee1
4
+ data.tar.gz: 744c4a0c1bc36d5eb1cf5a1f9ae6bb220cf0678df5d24b1ff4a60bdf586e4fa2
5
5
  SHA512:
6
- metadata.gz: 988ed498a5b30318230b13dd477125149ce76ca35bedab317843ce4b77f9ed0857d375f165e0268eb5d0877ae9ddda12f2fca221f2d82d95d14bb7dcf9f7e8e8
7
- data.tar.gz: fa274f938a19f3f8241288467d7724e1a63a5c43695fdce8ea7626ce38e005ce76b71a7af799028356660728f8510abfb41d46ec31d3f999049adeea9354b852
6
+ metadata.gz: c60a15054279a4b9d7ad51503e5d7456e65392d63857b84001a615bfc758fbfde792d33da60469dbc4fe0ef3a61af3b602b554937fed614cde5b751596c62fa3
7
+ data.tar.gz: b45ab49a73fc0b2ba59ecb8ab7ace4f1cb31d1332749154ef796a23fe4277069af087ef2153991a99b2bb1a1e7a00735b527d67df2b999fd01b1105d3aeb905d
@@ -44,7 +44,7 @@ module StytchB2B
44
44
 
45
45
  create_connection(&block)
46
46
 
47
- @jwks_cache = Stytch::JWKSCache.new(@connection, @project_id, jwks)
47
+ @jwks_cache = Stytch::JWKSCache.new(@connection, @project_id, jwks, is_b2b_client: @is_b2b_client)
48
48
 
49
49
  rbac = StytchB2B::RBAC.new(@connection)
50
50
  @policy_cache = Stytch::PolicyCache.new(rbac_client: rbac)
data/lib/stytch/client.rb CHANGED
@@ -42,7 +42,7 @@ module Stytch
42
42
 
43
43
  create_connection(&block)
44
44
 
45
- @jwks_cache = Stytch::JWKSCache.new(@connection, @project_id, jwks)
45
+ @jwks_cache = Stytch::JWKSCache.new(@connection, @project_id, jwks, is_b2b_client: @is_b2b_client)
46
46
 
47
47
  rbac = Stytch::RBAC.new(@connection)
48
48
  @policy_cache = Stytch::PolicyCache.new(rbac_client: rbac)
@@ -11,9 +11,10 @@ module Stytch
11
11
 
12
12
  CACHE_EXPIRY_SECONDS = 300 # 5 minutes
13
13
 
14
- def initialize(connection, project_id, jwks = nil)
14
+ def initialize(connection, project_id, jwks = nil, is_b2b_client: false)
15
15
  @connection = connection
16
16
  @project_id = project_id
17
+ @is_b2b_client = is_b2b_client
17
18
  @cache_last_update = 0
18
19
 
19
20
  # If jwks are provided during initialization, use them directly
@@ -38,15 +39,15 @@ module Stytch
38
39
  end
39
40
  end
40
41
 
41
- # Fetches JWKS from the Stytch API
42
+ # Fetches JWKS from the Stytch API using the appropriate endpoint
42
43
  def get_jwks(project_id:)
43
- request_with_query_params(
44
- @connection,
45
- '/v1/sessions/jwks/%<project_id>s',
46
- {
47
- project_id: project_id
48
- }
49
- )
44
+ endpoint = if @is_b2b_client
45
+ "/v1/b2b/sessions/jwks/#{project_id}"
46
+ else
47
+ "/v1/sessions/jwks/#{project_id}"
48
+ end
49
+
50
+ get_request(endpoint, {})
50
51
  end
51
52
  end
52
53
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stytch
4
- VERSION = '10.37.0'
4
+ VERSION = '10.37.1'
5
5
  end
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.37.0
4
+ version: 10.37.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - stytch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-09-30 00:00:00.000000000 Z
11
+ date: 2025-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday