cwt 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/.travis.yml +14 -7
- data/CHANGELOG.md +7 -0
- data/README.md +1 -1
- data/cwt.gemspec +5 -4
- data/lib/cwt/claims_set.rb +4 -16
- data/lib/cwt/version.rb +1 -1
- metadata +24 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58ca060eb1aa285140dcbd999832e2147779ed902b8524132b976db964dec35c
|
4
|
+
data.tar.gz: ec3f4154d2bae4530e462d2fc6253c305d314d96a9955d5dbdcb18e2440c9352
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c3dd6f536f9803aa3ca81c2b26757cccca74a0542f19fb622effa37d755f4ba3b67c0929d5db6a7f7d849df14f8129466fa93a12a675b1a537db73e7676a218
|
7
|
+
data.tar.gz: 290eadb2f3e862d52e344b197b4abeb5fdbe59f918172d2c9200a0b142d206ec23eb5e8014d97dbe593b8635c0075d94338581185e14152851ce4529632e19a0
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
@@ -1,10 +1,17 @@
|
|
1
|
-
|
2
|
-
sudo: false
|
1
|
+
dist: bionic
|
3
2
|
language: ruby
|
4
3
|
cache: bundler
|
4
|
+
|
5
5
|
rvm:
|
6
|
-
-
|
7
|
-
- 2.
|
8
|
-
- 2.
|
9
|
-
- 2.
|
10
|
-
|
6
|
+
- ruby-head
|
7
|
+
- 2.7.0
|
8
|
+
- 2.6.5
|
9
|
+
- 2.5.7
|
10
|
+
- 2.4.9
|
11
|
+
|
12
|
+
before_install: gem install bundler -v 2.1.4
|
13
|
+
|
14
|
+
matrix:
|
15
|
+
fast_finish: true
|
16
|
+
allow_failures:
|
17
|
+
- rvm: ruby-head
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v0.4.0] - 2020-01-30
|
4
|
+
|
5
|
+
### Dependencies
|
6
|
+
|
7
|
+
- Updated `cose` from `v0.9.0` to `v0.11.0`
|
8
|
+
|
3
9
|
## [v0.3.0] - 2019-09-02
|
4
10
|
|
5
11
|
### Added
|
@@ -12,5 +18,6 @@
|
|
12
18
|
|
13
19
|
- `CWT.decode` can decode a signed CWT
|
14
20
|
|
21
|
+
[v0.4.0]: https://github.com/cedarcode/cwt-ruby/compare/v0.3.0...v0.4.0/
|
15
22
|
[v0.3.0]: https://github.com/cedarcode/cwt-ruby/compare/v0.2.0...v0.3.0/
|
16
23
|
[v0.2.0]: https://github.com/cedarcode/cwt-ruby/compare/9985bac0a1ffe5c5d4d3d7330a453b65f71a148f...v0.2.0/
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Ruby implementation of RFC [8392](https://tools.ietf.org/html/rfc8392) CBOR Web Token (CWT)
|
4
4
|
|
5
5
|
[![Gem](https://img.shields.io/gem/v/cwt.svg?style=flat-square&color=informational)](https://rubygems.org/gems/cwt)
|
6
|
-
[![Travis](https://img.shields.io/travis/cedarcode/cwt-ruby.svg?style=flat-square)](https://travis-ci.org/cedarcode/cwt-ruby)
|
6
|
+
[![Travis](https://img.shields.io/travis/cedarcode/cwt-ruby/master.svg?style=flat-square)](https://travis-ci.org/cedarcode/cwt-ruby)
|
7
7
|
|
8
8
|
## Installation
|
9
9
|
|
data/cwt.gemspec
CHANGED
@@ -30,15 +30,16 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
31
|
spec.require_paths = ["lib"]
|
32
32
|
|
33
|
-
spec.required_ruby_version = ">= 2.
|
33
|
+
spec.required_ruby_version = ">= 2.4"
|
34
34
|
|
35
35
|
spec.add_dependency "cbor", "~> 0.5.9"
|
36
|
-
spec.add_dependency "cose", "~> 0.
|
36
|
+
spec.add_dependency "cose", "~> 0.11.0"
|
37
37
|
|
38
38
|
spec.add_development_dependency "bundler", "~> 2.0"
|
39
39
|
spec.add_development_dependency "byebug", "~> 11.0"
|
40
|
-
spec.add_development_dependency "rake", "~>
|
40
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
41
41
|
spec.add_development_dependency "rspec", "~> 3.8"
|
42
|
-
spec.add_development_dependency "rubocop", "~> 0.
|
42
|
+
spec.add_development_dependency "rubocop", "~> 0.75.1"
|
43
43
|
spec.add_development_dependency "rubocop-performance", "~> 1.4"
|
44
|
+
spec.add_development_dependency "timecop", "~> 0.9.1"
|
44
45
|
end
|
data/lib/cwt/claims_set.rb
CHANGED
@@ -40,24 +40,12 @@ module CWT
|
|
40
40
|
@cti = cti
|
41
41
|
end
|
42
42
|
|
43
|
-
def
|
44
|
-
|
45
|
-
end
|
46
|
-
|
47
|
-
def not_before
|
48
|
-
time_at(nbf)
|
43
|
+
def expired?
|
44
|
+
Time.now >= expiration_time
|
49
45
|
end
|
50
46
|
|
51
|
-
def
|
52
|
-
|
53
|
-
end
|
54
|
-
|
55
|
-
private
|
56
|
-
|
57
|
-
def time_at(value)
|
58
|
-
if value
|
59
|
-
Time.at(value)
|
60
|
-
end
|
47
|
+
def expiration_time
|
48
|
+
Time.at(exp)
|
61
49
|
end
|
62
50
|
end
|
63
51
|
end
|
data/lib/cwt/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cwt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gonzalo Rodriguez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cbor
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.11.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.11.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '13.0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '13.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rspec
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
103
|
+
version: 0.75.1
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
110
|
+
version: 0.75.1
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rubocop-performance
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,6 +122,20 @@ dependencies:
|
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '1.4'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: timecop
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 0.9.1
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 0.9.1
|
125
139
|
description: Ruby implementation of RFC 8392 CBOR Web Token (CWT)
|
126
140
|
email:
|
127
141
|
- gonzalo@cedarcode.com
|
@@ -160,14 +174,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
160
174
|
requirements:
|
161
175
|
- - ">="
|
162
176
|
- !ruby/object:Gem::Version
|
163
|
-
version: '2.
|
177
|
+
version: '2.4'
|
164
178
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
179
|
requirements:
|
166
180
|
- - ">="
|
167
181
|
- !ruby/object:Gem::Version
|
168
182
|
version: '0'
|
169
183
|
requirements: []
|
170
|
-
rubygems_version: 3.
|
184
|
+
rubygems_version: 3.1.2
|
171
185
|
signing_key:
|
172
186
|
specification_version: 4
|
173
187
|
summary: Ruby implementation of RFC 8392 CBOR Web Token (CWT)
|