github-authentication 1.3.2 → 1.3.5

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: bb1f3bc5c7da7b531a200f50c0e5ec44cb0d096756a4e0db3537c5435fe00695
4
- data.tar.gz: a39f88416b530d131d02810e01a4062f27fc4aa512e36cbd80c038bccd2f57f7
3
+ metadata.gz: 3d5122fc41b23d04162485a8687fbdfd5c31db20b376ecd9ca96eb4cd71b1932
4
+ data.tar.gz: fbc6874744a59f9798ccd8637a1daee0c70c93c70b44504c23bf5b4a6facd6e1
5
5
  SHA512:
6
- metadata.gz: 52202abc22a0ad0e06a8d775bcffbe0163cd0a4c9680a1162935da80593bda4aa5d28fe505f11af223cc81171063d19b831fe9c25dd4f9241aeaf4b1f174b139
7
- data.tar.gz: 86b3340fdc374cb08909a88e6ee8ca615a2b9fd93c0608322ccb03e7b5981f773836f3dc0c59615c671d8616a5fbb5b1eb4f9d20a29ef5a08e96ba882d15cbc7
6
+ metadata.gz: eee79e49eec6a3219fd1a6f1300608a4ba11f5d082dbd08944c1d5987a24502688297475e368b7792ee74265d1e45399290765ff41699544d1fefe9dbee99e3f
7
+ data.tar.gz: 94017ec73d1361cc10e08ee0d74a1ee4d195b4342b6be232985281c98e654fc05990372b518b9e8996fea66673f0beb63f83f7db95cfd1706177620e84afccf7
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  ### Next
2
2
 
3
- ...
3
+ ### 1.3.5
4
+ - Loosen `jwt` dependency constraint from `~> 2.2` to `>= 2.2, < 4` to allow `jwt` 3.x.
5
+
6
+ ### 1.3.4
7
+ - Set JWT `iat` 60 seconds in the past to avoid clock drift issues with GitHub API
4
8
 
5
9
  ### 1.3.2
6
10
  - Add missing requires for active_support/cache to environment.rb
data/Gemfile.lock CHANGED
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- github-authentication (1.3.2)
4
+ github-authentication (1.3.5)
5
5
  activesupport (> 7)
6
- jwt (~> 2.2)
6
+ jwt (>= 2.2, < 4)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (8.1.2)
11
+ activesupport (8.1.3)
12
12
  base64
13
13
  bigdecimal
14
14
  concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -25,7 +25,7 @@ GEM
25
25
  public_suffix (>= 2.0.2, < 8.0)
26
26
  ast (2.4.3)
27
27
  base64 (0.3.0)
28
- bigdecimal (4.0.1)
28
+ bigdecimal (4.1.2)
29
29
  concurrent-ruby (1.3.6)
30
30
  connection_pool (3.0.2)
31
31
  crack (1.0.1)
@@ -35,8 +35,8 @@ GEM
35
35
  hashdiff (1.2.1)
36
36
  i18n (1.14.8)
37
37
  concurrent-ruby (~> 1.0)
38
- json (2.18.1)
39
- jwt (2.10.2)
38
+ json (2.19.5)
39
+ jwt (3.2.0)
40
40
  base64
41
41
  language_server-protocol (3.17.0.5)
42
42
  lint_roller (1.1.0)
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
35
35
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
36
36
  spec.require_paths = ["lib"]
37
37
 
38
- spec.add_dependency("jwt", "~> 2.2")
38
+ spec.add_dependency("jwt", ">= 2.2", "< 4")
39
39
 
40
40
  spec.required_ruby_version = ">= 2.7.0"
41
41
 
@@ -35,11 +35,12 @@ module GithubAuthentication
35
35
  private
36
36
 
37
37
  def jwt
38
+ iat = Time.now.utc.to_i - 60
38
39
  payload = {
39
- # issued at time
40
- iat: Time.now.utc.to_i,
40
+ # issued at time, 60 seconds in the past to allow for clock drift
41
+ iat: iat,
41
42
  # JWT expiration time (10 minute maximum)
42
- exp: Time.now.utc.to_i + (10 * 60),
43
+ exp: iat + (10 * 60),
43
44
  # GitHub App's identifier
44
45
  iss: app_id,
45
46
  }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GithubAuthentication
4
- VERSION = "1.3.2"
4
+ VERSION = "1.3.5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-authentication
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frederik Dudzik
@@ -13,16 +13,22 @@ dependencies:
13
13
  name: jwt
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - "~>"
16
+ - - ">="
17
17
  - !ruby/object:Gem::Version
18
18
  version: '2.2'
19
+ - - "<"
20
+ - !ruby/object:Gem::Version
21
+ version: '4'
19
22
  type: :runtime
20
23
  prerelease: false
21
24
  version_requirements: !ruby/object:Gem::Requirement
22
25
  requirements:
23
- - - "~>"
26
+ - - ">="
24
27
  - !ruby/object:Gem::Version
25
28
  version: '2.2'
29
+ - - "<"
30
+ - !ruby/object:Gem::Version
31
+ version: '4'
26
32
  - !ruby/object:Gem::Dependency
27
33
  name: activesupport
28
34
  requirement: !ruby/object:Gem::Requirement
@@ -195,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
201
  - !ruby/object:Gem::Version
196
202
  version: '0'
197
203
  requirements: []
198
- rubygems_version: 4.0.6
204
+ rubygems_version: 4.0.11
199
205
  specification_version: 4
200
206
  summary: GitHub Authetication
201
207
  test_files: []