jwt-auth 4.0.0 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c956f873db709997837bf27371d2dc5f6315d072004be257a99a554f59ad67e
4
- data.tar.gz: f8066ab1085f05a481d59f937c279e3a8d88a572761d36b76daed80db72b512f
3
+ metadata.gz: 350e77e8646205ed02b1db78d49c026fb117559d0a9a6678ab32d72ec2149b7c
4
+ data.tar.gz: 1b2083fc8e144347d541a5255422e1e3322784d3b57292f6fe2d9c064d91da62
5
5
  SHA512:
6
- metadata.gz: ae88929951aaae1affd6bb29b9c6ef8392ae582ecd81b2a59bd02777798d1d2830ab266f9900d3b9b4374b61d4be18e7f1b22dffc61e046fb99cba7cba2e8043
7
- data.tar.gz: 3b93f3b8b80cffc983a2baed9b3bbc296736bb1faacf0823ad78ce608e21d34faf2dfcdf5271068e0bbec1f4ca543bd31ec96dbb96327875ff24bedb24f8e4d3
6
+ metadata.gz: 9e3fbe6dffa6da9dbb3df74b23a2375606313ad9c6e572e8cd1a21f74f9999098e0db2a66d7b6d56984359d317dbdc6c644ff3ac3e32a8534368acb0b1f4b50b
7
+ data.tar.gz: 5ae2ac9c28f0a43fb3f4d14d2711a0e95821197b9397c92079e7ac6c62ce6d01600fb538b247e7f1824a38e5cee4ccfed5edf80626403779a19665495aaa157f
@@ -18,6 +18,7 @@ module JWT
18
18
 
19
19
  return false if subject.nil? || issued_at.nil? || token_version.nil?
20
20
  return false if Time.at(issued_at + lifetime.to_i).past?
21
+ return false if Time.at(issued_at).future?
21
22
  return false if token_version != subject.token_version
22
23
 
23
24
  true
@@ -2,6 +2,6 @@
2
2
 
3
3
  module JWT
4
4
  module Auth
5
- VERSION = '4.0.0'
5
+ VERSION = '4.0.1'
6
6
  end
7
7
  end
@@ -69,6 +69,14 @@ RSpec.describe JWT::Auth::Token do
69
69
 
70
70
  expect(t).not_to be_valid
71
71
  end
72
+
73
+ it 'is invalid on future tokens' do
74
+ token.issued_at = 1.year.from_now.to_i
75
+
76
+ t = JWT::Auth::Token.from_token token.to_jwt
77
+
78
+ expect(t).not_to be_valid
79
+ end
72
80
  end
73
81
 
74
82
  describe 'renew!' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jwt-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Dejonckheere
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-25 00:00:00.000000000 Z
11
+ date: 2018-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt