getstream-ruby 7.1.0 → 7.1.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: 388126d2a284a9b97ac8eb6cd1793088ccfc51992504de016192d7974d582e3e
4
- data.tar.gz: 3fb211b156d236f9b27734651215351d9a3a370d6d6a1da52bfe5fa779cdf7b9
3
+ metadata.gz: d60ac76c36bbf0f4fba277c49eca708e4d4784808a1c245a115dc48a05adf4f1
4
+ data.tar.gz: 372a04fd43e84b06c8e46eb64540124a2c4c7702066f03b415195e081137df61
5
5
  SHA512:
6
- metadata.gz: ebae01df899c155f88efa4296b92766df5cc08f9dbd6b81188de15ddccc791eb7a5d4c1f8767c8e20c95601c109fb07de9e586bcb028786f8f6ce4904ad76352
7
- data.tar.gz: 487609c26921506f9b5ea2cccedec98911adcd831189b785ede0963d75df993fa4ff768745574c37ac4d2f10764677f104c8ff403b1bef87f2ea867874abdd63
6
+ metadata.gz: 8ed574ba891c4692474dfc64358acc9c8c3c2b00b9d93238f333c75d5659263e0bd0006a328102344d50356e097b765bab0f69b6e9ee60ca6930710adc932c5c
7
+ data.tar.gz: 929b48c5fdffa86dfaf3155830493deeecba853d9bd72eae58c63fdbb235672e3920827a385b5789572ebc4fdf7c43c6641e09d8d75cba185f6a3ec0e9d8a163
@@ -25,6 +25,16 @@ module GetStreamRuby
25
25
 
26
26
  class Client
27
27
 
28
+ # Backdate the JWT `iat` claim by this many seconds.
29
+ #
30
+ # JWT timestamps are whole-second (RFC 7519 NumericDate), so `Time.now.to_i`
31
+ # truncates to the second. The server applies minimal forward leeway on
32
+ # `iat`, so stamping `iat = now` lets a small fraction of requests be
33
+ # rejected ("token used before issue at (iat)") whenever the caller's clock
34
+ # is even marginally ahead of the server and the truncation lands on a
35
+ # second boundary. Backdating absorbs that sub-second skew.
36
+ AUTH_IAT_LEEWAY_SECONDS = 5
37
+
28
38
  attr_reader :configuration
29
39
 
30
40
  def initialize(config = nil, api_key: nil, api_secret: nil, **options)
@@ -274,7 +284,7 @@ module GetStreamRuby
274
284
  def generate_auth_header
275
285
  JWT.encode(
276
286
  {
277
- iat: Time.now.to_i,
287
+ iat: Time.now.to_i - AUTH_IAT_LEEWAY_SECONDS,
278
288
  server: true,
279
289
  },
280
290
  @configuration.api_secret,
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GetStreamRuby
4
4
 
5
- VERSION = '7.1.0'
5
+ VERSION = '7.1.1'
6
6
 
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: getstream-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.0
4
+ version: 7.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GetStream
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-09 00:00:00.000000000 Z
11
+ date: 2026-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv