github-authentication 1.3.2 → 1.3.4

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: ba0d4206f9bcaa96756dd3817703472bdc47ea61c0c091a2d2b859bbfd992400
4
+ data.tar.gz: 8e78e70468b9a325c2e4cf175c6468cfffe0ff25d8548f8f7da3cd38f947acb4
5
5
  SHA512:
6
- metadata.gz: 52202abc22a0ad0e06a8d775bcffbe0163cd0a4c9680a1162935da80593bda4aa5d28fe505f11af223cc81171063d19b831fe9c25dd4f9241aeaf4b1f174b139
7
- data.tar.gz: 86b3340fdc374cb08909a88e6ee8ca615a2b9fd93c0608322ccb03e7b5981f773836f3dc0c59615c671d8616a5fbb5b1eb4f9d20a29ef5a08e96ba882d15cbc7
6
+ metadata.gz: 59310f4f541a6bc63916d833638a0ea9445145a2637d3cf0d6c25c3b914cf7815507c70ccdb2faa389c3e16e1e3dde1d73738421c38b8e02d95964d6181889c1
7
+ data.tar.gz: 268d665d20955c79d2d21ca973900477288e6baeeb282587c9966d60668c91b505de4f76bbcf45107e2d30afdc27b4dbc21b30bb28302b00d248fffce6a64e72
data/CHANGELOG.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  ...
4
4
 
5
+ ### 1.3.4
6
+ - Set JWT `iat` 60 seconds in the past to avoid clock drift issues with GitHub API
7
+
5
8
  ### 1.3.2
6
9
  - Add missing requires for active_support/cache to environment.rb
7
10
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- github-authentication (1.3.2)
4
+ github-authentication (1.3.4)
5
5
  activesupport (> 7)
6
6
  jwt (~> 2.2)
7
7
 
@@ -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.4"
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.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frederik Dudzik
@@ -195,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
195
  - !ruby/object:Gem::Version
196
196
  version: '0'
197
197
  requirements: []
198
- rubygems_version: 4.0.6
198
+ rubygems_version: 4.0.8
199
199
  specification_version: 4
200
200
  summary: GitHub Authetication
201
201
  test_files: []