rotp 2.1.1 → 6.2.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rotp might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/.devcontainer/Dockerfile +19 -0
- data/.devcontainer/devcontainer.json +37 -0
- data/.dockerignore +1 -0
- data/.github/workflows/test.yaml +27 -0
- data/.gitignore +2 -0
- data/CHANGELOG.md +95 -0
- data/Dockerfile-2.3 +10 -0
- data/Dockerfile-2.7 +11 -0
- data/Dockerfile-3.0-rc +12 -0
- data/Guardfile +1 -1
- data/README.md +125 -31
- data/bin/rotp +1 -1
- data/docker-compose.yml +37 -0
- data/lib/rotp/arguments.rb +6 -5
- data/lib/rotp/base32.rb +56 -29
- data/lib/rotp/cli.rb +6 -10
- data/lib/rotp/hotp.rb +11 -26
- data/lib/rotp/otp/uri.rb +79 -0
- data/lib/rotp/otp.rb +20 -31
- data/lib/rotp/totp.rb +43 -29
- data/lib/rotp/version.rb +1 -1
- data/lib/rotp.rb +2 -3
- data/rotp.gemspec +15 -18
- data/spec/lib/rotp/arguments_spec.rb +18 -5
- data/spec/lib/rotp/base32_spec.rb +51 -19
- data/spec/lib/rotp/cli_spec.rb +42 -3
- data/spec/lib/rotp/hotp_spec.rb +39 -60
- data/spec/lib/rotp/otp/uri_spec.rb +99 -0
- data/spec/lib/rotp/totp_spec.rb +138 -120
- data/spec/spec_helper.rb +7 -0
- metadata +27 -45
- data/.travis.yml +0 -7
- data/Gemfile.lock +0 -75
- data/Rakefile +0 -9
- data/doc/ROTP/HOTP.html +0 -308
- data/doc/ROTP/OTP.html +0 -593
- data/doc/ROTP/TOTP.html +0 -493
- data/doc/Rotp.html +0 -179
- data/doc/_index.html +0 -144
- data/doc/class_list.html +0 -36
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -53
- data/doc/css/style.css +0 -310
- data/doc/file.README.html +0 -89
- data/doc/file_list.html +0 -38
- data/doc/frames.html +0 -13
- data/doc/index.html +0 -89
- data/doc/js/app.js +0 -203
- data/doc/js/full_list.js +0 -149
- data/doc/js/jquery.js +0 -154
- data/doc/method_list.html +0 -155
- data/doc/top-level-namespace.html +0 -88
data/spec/lib/rotp/totp_spec.rb
CHANGED
@@ -1,66 +1,58 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
+
TEST_TIME = Time.utc 2016, 9, 23, 9 # 2016-09-23 09:00:00 UTC
|
4
|
+
TEST_TOKEN = '082630'.freeze
|
5
|
+
|
3
6
|
RSpec.describe ROTP::TOTP do
|
4
|
-
let(:now) {
|
5
|
-
let(:token) {
|
7
|
+
let(:now) { TEST_TIME }
|
8
|
+
let(:token) { TEST_TOKEN }
|
6
9
|
let(:totp) { ROTP::TOTP.new 'JBSWY3DPEHPK3PXP' }
|
7
10
|
|
8
11
|
describe '#at' do
|
9
|
-
|
10
|
-
let(:token) { totp.at now }
|
12
|
+
let(:token) { totp.at now }
|
11
13
|
|
12
|
-
|
13
|
-
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
context 'without padding' do
|
18
|
-
let(:token) { totp.at now, false }
|
19
|
-
|
20
|
-
it 'is an integer' do
|
21
|
-
expect(token).to eq 68212
|
22
|
-
end
|
14
|
+
it 'is a string number' do
|
15
|
+
expect(token).to eq TEST_TOKEN
|
23
16
|
end
|
24
17
|
|
25
18
|
context 'RFC compatibility' do
|
26
19
|
let(:totp) { ROTP::TOTP.new('GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ') }
|
27
20
|
|
28
21
|
it 'matches the RFC documentation examples' do
|
29
|
-
expect(totp.at
|
30
|
-
expect(totp.at
|
31
|
-
expect(totp.at
|
22
|
+
expect(totp.at(1_111_111_111)).to eq '050471'
|
23
|
+
expect(totp.at(1_234_567_890)).to eq '005924'
|
24
|
+
expect(totp.at(2_000_000_000)).to eq '279037'
|
32
25
|
end
|
33
|
-
|
34
26
|
end
|
35
27
|
end
|
36
28
|
|
37
29
|
describe '#verify' do
|
38
|
-
let(:verification) { totp.verify token, now }
|
30
|
+
let(:verification) { totp.verify token, at: now }
|
39
31
|
|
40
32
|
context 'numeric token' do
|
41
|
-
let(:token) {
|
33
|
+
let(:token) { 82_630 }
|
42
34
|
|
43
|
-
it 'raises an error' do
|
44
|
-
expect { verification }.to raise_error
|
35
|
+
it 'raises an error with an integer' do
|
36
|
+
expect { verification }.to raise_error(ArgumentError)
|
45
37
|
end
|
46
38
|
end
|
47
39
|
|
48
40
|
context 'unpadded string token' do
|
49
|
-
let(:token) { '
|
41
|
+
let(:token) { '82630' }
|
50
42
|
|
51
|
-
it '
|
43
|
+
it 'fails to verify' do
|
52
44
|
expect(verification).to be_falsey
|
53
45
|
end
|
54
46
|
end
|
55
47
|
|
56
48
|
context 'correctly padded string token' do
|
57
|
-
it '
|
49
|
+
it 'verifies' do
|
58
50
|
expect(verification).to be_truthy
|
59
51
|
end
|
60
52
|
end
|
61
53
|
|
62
54
|
context 'RFC compatibility' do
|
63
|
-
let(:totp)
|
55
|
+
let(:totp) { ROTP::TOTP.new 'wrn3pqx5uqxqvnqr' }
|
64
56
|
|
65
57
|
before do
|
66
58
|
Timecop.freeze now
|
@@ -68,146 +60,173 @@ RSpec.describe ROTP::TOTP do
|
|
68
60
|
|
69
61
|
context 'correct time based OTP' do
|
70
62
|
let(:token) { '102705' }
|
71
|
-
let(:now) { Time.at
|
63
|
+
let(:now) { Time.at 1_297_553_958 }
|
72
64
|
|
73
|
-
it '
|
65
|
+
it 'verifies' do
|
74
66
|
expect(totp.verify('102705')).to be_truthy
|
75
67
|
end
|
76
68
|
end
|
77
69
|
|
78
70
|
context 'wrong time based OTP' do
|
79
|
-
it '
|
71
|
+
it 'fails to verify' do
|
80
72
|
expect(totp.verify('102705')).to be_falsey
|
81
73
|
end
|
82
74
|
end
|
83
75
|
end
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
context 'without issuer' do
|
91
|
-
it 'has the correct format' do
|
92
|
-
expect(uri).to match %r{\Aotpauth:\/\/totp.+}
|
76
|
+
context 'invalidating reused tokens' do
|
77
|
+
let(:verification) do
|
78
|
+
totp.verify token,
|
79
|
+
after: after,
|
80
|
+
at: now
|
93
81
|
end
|
82
|
+
let(:after) { nil }
|
94
83
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
context 'with issuer' do
|
101
|
-
let(:totp) { ROTP::TOTP.new 'JBSWY3DPEHPK3PXP', issuer: 'FooCo' }
|
102
|
-
|
103
|
-
it 'has the correct format' do
|
104
|
-
expect(uri).to match %r{\Aotpauth:\/\/totp.+}
|
105
|
-
end
|
106
|
-
|
107
|
-
it 'includes the secret as parameter' do
|
108
|
-
expect(params['secret'].first).to eq 'JBSWY3DPEHPK3PXP'
|
109
|
-
end
|
110
|
-
|
111
|
-
it 'includes the issuer as parameter' do
|
112
|
-
expect(params['issuer'].first).to eq 'FooCo'
|
113
|
-
end
|
114
|
-
end
|
115
|
-
|
116
|
-
context 'with custom interval' do
|
117
|
-
let(:totp) { ROTP::TOTP.new 'JBSWY3DPEHPK3PXP', interval: 60 }
|
118
|
-
|
119
|
-
it 'has the correct format' do
|
120
|
-
expect(uri).to match %r{\Aotpauth:\/\/totp.+}
|
121
|
-
end
|
84
|
+
context 'passing in the `after` timestamp' do
|
85
|
+
let(:after) do
|
86
|
+
totp.verify TEST_TOKEN, after: nil, at: now
|
87
|
+
end
|
122
88
|
|
123
|
-
|
124
|
-
|
125
|
-
|
89
|
+
it 'returns a timecode' do
|
90
|
+
expect(after).to be_kind_of(Integer)
|
91
|
+
expect(after).to be_within(30).of(now.to_i)
|
92
|
+
end
|
126
93
|
|
127
|
-
|
128
|
-
|
94
|
+
context 'reusing same token' do
|
95
|
+
it 'is false' do
|
96
|
+
expect(verification).to be_falsy
|
97
|
+
end
|
98
|
+
end
|
129
99
|
end
|
130
100
|
end
|
131
101
|
end
|
132
102
|
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
context 'numeric token' do
|
138
|
-
let(:token) { 68212 }
|
103
|
+
def get_timecodes(at, b, a)
|
104
|
+
# Test the private method
|
105
|
+
totp.send('get_timecodes', at, b, a)
|
106
|
+
end
|
139
107
|
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
108
|
+
describe 'drifting timecodes' do
|
109
|
+
it 'should get timecodes behind' do
|
110
|
+
expect(get_timecodes(TEST_TIME + 15, 15, 0)).to eq([49_154_040])
|
111
|
+
expect(get_timecodes(TEST_TIME, 15, 0)).to eq([49_154_039, 49_154_040])
|
112
|
+
expect(get_timecodes(TEST_TIME, 40, 0)).to eq([49_154_038, 49_154_039, 49_154_040])
|
113
|
+
expect(get_timecodes(TEST_TIME, 90, 0)).to eq([49_154_037, 49_154_038, 49_154_039, 49_154_040])
|
144
114
|
end
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
expect(verification).to be_falsey
|
152
|
-
end
|
115
|
+
it 'should get timecodes ahead' do
|
116
|
+
expect(get_timecodes(TEST_TIME, 0, 15)).to eq([49_154_040])
|
117
|
+
expect(get_timecodes(TEST_TIME + 15, 0, 15)).to eq([49_154_040, 49_154_041])
|
118
|
+
expect(get_timecodes(TEST_TIME, 0, 30)).to eq([49_154_040, 49_154_041])
|
119
|
+
expect(get_timecodes(TEST_TIME, 0, 70)).to eq([49_154_040, 49_154_041, 49_154_042])
|
120
|
+
expect(get_timecodes(TEST_TIME, 0, 90)).to eq([49_154_040, 49_154_041, 49_154_042, 49_154_043])
|
153
121
|
end
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
it 'is true' do
|
159
|
-
expect(verification).to be_truthy
|
160
|
-
end
|
122
|
+
it 'should get timecodes behind and ahead' do
|
123
|
+
expect(get_timecodes(TEST_TIME, 30, 30)).to eq([49_154_039, 49_154_040, 49_154_041])
|
124
|
+
expect(get_timecodes(TEST_TIME, 60, 60)).to eq([49_154_038, 49_154_039, 49_154_040, 49_154_041, 49_154_042])
|
161
125
|
end
|
126
|
+
end
|
162
127
|
|
163
|
-
|
164
|
-
|
165
|
-
|
128
|
+
describe '#verify with drift' do
|
129
|
+
let(:verification) { totp.verify token, drift_ahead: drift_ahead, drift_behind: drift_behind, at: now }
|
130
|
+
let(:drift_ahead) { 0 }
|
131
|
+
let(:drift_behind) { 0 }
|
166
132
|
|
167
|
-
|
133
|
+
context 'with an old OTP' do
|
134
|
+
let(:token) { totp.at TEST_TIME - 30 } # Previous token at 2016-09-23 08:59:30 UTC
|
135
|
+
let(:drift_behind) { 15 }
|
136
|
+
|
137
|
+
# Tested at 2016-09-23 09:00:00 UTC, and with drift back to 2016-09-23 08:59:45 UTC
|
138
|
+
# This would therefore include 2 intervals
|
139
|
+
it 'inside of drift range' do
|
168
140
|
expect(verification).to be_truthy
|
169
141
|
end
|
170
|
-
end
|
171
142
|
|
172
|
-
|
173
|
-
|
174
|
-
|
143
|
+
# Tested at 2016-09-23 09:00:20 UTC, and with drift back to 2016-09-23 09:00:05 UTC
|
144
|
+
# This only includes 1 interval, therefore only the current token is valid
|
145
|
+
context 'outside of drift range' do
|
146
|
+
let(:now) { TEST_TIME + 20 }
|
175
147
|
|
176
|
-
|
177
|
-
|
148
|
+
it 'is nil' do
|
149
|
+
expect(verification).to be_nil
|
150
|
+
end
|
178
151
|
end
|
179
152
|
end
|
180
153
|
|
181
|
-
context '
|
182
|
-
let(:token) { totp.at
|
183
|
-
let(:
|
154
|
+
context 'with a future OTP' do
|
155
|
+
let(:token) { totp.at TEST_TIME + 30 } # The next valid token - 2016-09-23 09:00:30 UTC
|
156
|
+
let(:drift_ahead) { 15 }
|
184
157
|
|
185
|
-
|
158
|
+
# Tested at 2016-09-23 09:00:00 UTC, and ahead to 2016-09-23 09:00:15 UTC
|
159
|
+
# This only includes 1 interval, therefore only the current token is valid
|
160
|
+
it 'outside of drift range' do
|
186
161
|
expect(verification).to be_falsey
|
187
162
|
end
|
163
|
+
# Tested at 2016-09-23 09:00:20 UTC, and with drift ahead to 2016-09-23 09:00:35 UTC
|
164
|
+
# This would therefore include 2 intervals
|
165
|
+
context 'inside of drift range' do
|
166
|
+
let(:now) { TEST_TIME + 20 }
|
167
|
+
|
168
|
+
it 'is true' do
|
169
|
+
expect(verification).to be_truthy
|
170
|
+
end
|
171
|
+
end
|
188
172
|
end
|
173
|
+
end
|
189
174
|
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
175
|
+
describe '#verify with drift and prevent token reuse' do
|
176
|
+
let(:verification) { totp.verify token, drift_ahead: drift_ahead, drift_behind: drift_behind, after: after, at: now }
|
177
|
+
let(:drift_ahead) { 0 }
|
178
|
+
let(:drift_behind) { 0 }
|
179
|
+
let(:after) { nil }
|
180
|
+
|
181
|
+
context 'with the `after` timestamp set' do
|
182
|
+
context 'older token' do
|
183
|
+
let(:token) { totp.at TEST_TIME - 30 }
|
184
|
+
let(:drift_behind) { 15 }
|
194
185
|
|
195
186
|
it 'is true' do
|
196
187
|
expect(verification).to be_truthy
|
188
|
+
expect(verification).to eq((TEST_TIME - 30).to_i)
|
189
|
+
end
|
190
|
+
|
191
|
+
context 'after it has been used' do
|
192
|
+
let(:after) do
|
193
|
+
totp.verify token, after: nil, at: now, drift_behind: drift_behind
|
194
|
+
end
|
195
|
+
it 'is false' do
|
196
|
+
expect(verification).to be_falsey
|
197
|
+
end
|
197
198
|
end
|
198
199
|
end
|
199
200
|
|
200
|
-
context '
|
201
|
-
let(:token) { totp.at
|
202
|
-
let(:
|
201
|
+
context 'newer token' do
|
202
|
+
let(:token) { totp.at TEST_TIME + 30 }
|
203
|
+
let(:drift_ahead) { 15 }
|
204
|
+
let(:now) { TEST_TIME + 15 }
|
203
205
|
|
204
206
|
it 'is true' do
|
205
207
|
expect(verification).to be_truthy
|
208
|
+
expect(verification).to eq((TEST_TIME + 30).to_i)
|
209
|
+
end
|
210
|
+
|
211
|
+
context 'after it has been used' do
|
212
|
+
let(:after) do
|
213
|
+
totp.verify token, after: nil, at: now, drift_ahead: drift_ahead
|
214
|
+
end
|
215
|
+
it 'is false' do
|
216
|
+
expect(verification).to be_falsey
|
217
|
+
end
|
206
218
|
end
|
207
219
|
end
|
208
220
|
end
|
209
221
|
end
|
210
222
|
|
223
|
+
describe '#provisioning_uri' do
|
224
|
+
it 'accepts the account name' do
|
225
|
+
expect(totp.provisioning_uri('mark@percival'))
|
226
|
+
.to eq 'otpauth://totp/mark%40percival?secret=JBSWY3DPEHPK3PXP'
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
211
230
|
describe '#now' do
|
212
231
|
before do
|
213
232
|
Timecop.freeze now
|
@@ -215,7 +234,7 @@ RSpec.describe ROTP::TOTP do
|
|
215
234
|
|
216
235
|
context 'Google Authenticator' do
|
217
236
|
let(:totp) { ROTP::TOTP.new 'wrn3pqx5uqxqvnqr' }
|
218
|
-
let(:now) { Time.at
|
237
|
+
let(:now) { Time.at 1_297_553_958 }
|
219
238
|
|
220
239
|
it 'matches the known output' do
|
221
240
|
expect(totp.now).to eq '102705'
|
@@ -224,12 +243,11 @@ RSpec.describe ROTP::TOTP do
|
|
224
243
|
|
225
244
|
context 'Dropbox 26 char secret output' do
|
226
245
|
let(:totp) { ROTP::TOTP.new 'tjtpqea6a42l56g5eym73go2oa' }
|
227
|
-
let(:now) { Time.at
|
246
|
+
let(:now) { Time.at 1_378_762_454 }
|
228
247
|
|
229
248
|
it 'matches the known output' do
|
230
249
|
expect(totp.now).to eq '747864'
|
231
250
|
end
|
232
251
|
end
|
233
252
|
end
|
234
|
-
|
235
253
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,71 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rotp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 6.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Percival
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '13.0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '13.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '3.5'
|
34
34
|
type: :development
|
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: '
|
40
|
+
version: '3.5'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: simplecov
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0.12'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0.12'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: timecop
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
61
|
+
version: '0.8'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0.
|
68
|
+
version: '0.8'
|
69
69
|
description: Works for both HOTP and TOTP, and includes QR Code provisioning
|
70
70
|
email:
|
71
71
|
- mark@markpercival.us
|
@@ -74,40 +74,28 @@ executables:
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
+
- ".devcontainer/Dockerfile"
|
78
|
+
- ".devcontainer/devcontainer.json"
|
79
|
+
- ".dockerignore"
|
80
|
+
- ".github/workflows/test.yaml"
|
77
81
|
- ".gitignore"
|
78
|
-
- ".travis.yml"
|
79
82
|
- CHANGELOG.md
|
83
|
+
- Dockerfile-2.3
|
84
|
+
- Dockerfile-2.7
|
85
|
+
- Dockerfile-3.0-rc
|
80
86
|
- Gemfile
|
81
|
-
- Gemfile.lock
|
82
87
|
- Guardfile
|
83
88
|
- LICENSE
|
84
89
|
- README.md
|
85
|
-
- Rakefile
|
86
90
|
- bin/rotp
|
87
|
-
-
|
88
|
-
- doc/ROTP/OTP.html
|
89
|
-
- doc/ROTP/TOTP.html
|
90
|
-
- doc/Rotp.html
|
91
|
-
- doc/_index.html
|
92
|
-
- doc/class_list.html
|
93
|
-
- doc/css/common.css
|
94
|
-
- doc/css/full_list.css
|
95
|
-
- doc/css/style.css
|
96
|
-
- doc/file.README.html
|
97
|
-
- doc/file_list.html
|
98
|
-
- doc/frames.html
|
99
|
-
- doc/index.html
|
100
|
-
- doc/js/app.js
|
101
|
-
- doc/js/full_list.js
|
102
|
-
- doc/js/jquery.js
|
103
|
-
- doc/method_list.html
|
104
|
-
- doc/top-level-namespace.html
|
91
|
+
- docker-compose.yml
|
105
92
|
- lib/rotp.rb
|
106
93
|
- lib/rotp/arguments.rb
|
107
94
|
- lib/rotp/base32.rb
|
108
95
|
- lib/rotp/cli.rb
|
109
96
|
- lib/rotp/hotp.rb
|
110
97
|
- lib/rotp/otp.rb
|
98
|
+
- lib/rotp/otp/uri.rb
|
111
99
|
- lib/rotp/totp.rb
|
112
100
|
- lib/rotp/version.rb
|
113
101
|
- rotp.gemspec
|
@@ -115,9 +103,10 @@ files:
|
|
115
103
|
- spec/lib/rotp/base32_spec.rb
|
116
104
|
- spec/lib/rotp/cli_spec.rb
|
117
105
|
- spec/lib/rotp/hotp_spec.rb
|
106
|
+
- spec/lib/rotp/otp/uri_spec.rb
|
118
107
|
- spec/lib/rotp/totp_spec.rb
|
119
108
|
- spec/spec_helper.rb
|
120
|
-
homepage:
|
109
|
+
homepage: https://github.com/mdp/rotp
|
121
110
|
licenses:
|
122
111
|
- MIT
|
123
112
|
metadata: {}
|
@@ -129,22 +118,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
129
118
|
requirements:
|
130
119
|
- - ">="
|
131
120
|
- !ruby/object:Gem::Version
|
132
|
-
version: '
|
121
|
+
version: '2.3'
|
133
122
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
134
123
|
requirements:
|
135
124
|
- - ">="
|
136
125
|
- !ruby/object:Gem::Version
|
137
126
|
version: '0'
|
138
127
|
requirements: []
|
139
|
-
|
140
|
-
rubygems_version: 2.2.2
|
128
|
+
rubygems_version: 3.3.26
|
141
129
|
signing_key:
|
142
130
|
specification_version: 4
|
143
131
|
summary: A Ruby library for generating and verifying one time passwords
|
144
|
-
test_files:
|
145
|
-
- spec/lib/rotp/arguments_spec.rb
|
146
|
-
- spec/lib/rotp/base32_spec.rb
|
147
|
-
- spec/lib/rotp/cli_spec.rb
|
148
|
-
- spec/lib/rotp/hotp_spec.rb
|
149
|
-
- spec/lib/rotp/totp_spec.rb
|
150
|
-
- spec/spec_helper.rb
|
132
|
+
test_files: []
|
data/.travis.yml
DELETED
data/Gemfile.lock
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
rotp (2.1.0)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: http://rubygems.org/
|
8
|
-
specs:
|
9
|
-
celluloid (0.16.0)
|
10
|
-
timers (~> 4.0.0)
|
11
|
-
coderay (1.1.0)
|
12
|
-
diff-lcs (1.2.5)
|
13
|
-
ffi (1.9.6)
|
14
|
-
formatador (0.2.5)
|
15
|
-
guard (2.11.1)
|
16
|
-
formatador (>= 0.2.4)
|
17
|
-
listen (~> 2.7)
|
18
|
-
lumberjack (~> 1.0)
|
19
|
-
nenv (~> 0.1)
|
20
|
-
notiffany (~> 0.0)
|
21
|
-
pry (>= 0.9.12)
|
22
|
-
shellany (~> 0.0)
|
23
|
-
thor (>= 0.18.1)
|
24
|
-
guard-compat (1.2.0)
|
25
|
-
guard-rspec (4.5.0)
|
26
|
-
guard (~> 2.1)
|
27
|
-
guard-compat (~> 1.1)
|
28
|
-
rspec (>= 2.99.0, < 4.0)
|
29
|
-
hitimes (1.2.2)
|
30
|
-
listen (2.8.5)
|
31
|
-
celluloid (>= 0.15.2)
|
32
|
-
rb-fsevent (>= 0.9.3)
|
33
|
-
rb-inotify (>= 0.9)
|
34
|
-
lumberjack (1.0.9)
|
35
|
-
method_source (0.8.2)
|
36
|
-
nenv (0.1.1)
|
37
|
-
notiffany (0.0.3)
|
38
|
-
nenv (~> 0.1)
|
39
|
-
shellany (~> 0.0)
|
40
|
-
pry (0.10.1)
|
41
|
-
coderay (~> 1.1.0)
|
42
|
-
method_source (~> 0.8.1)
|
43
|
-
slop (~> 3.4)
|
44
|
-
rake (10.4.2)
|
45
|
-
rb-fsevent (0.9.4)
|
46
|
-
rb-inotify (0.9.5)
|
47
|
-
ffi (>= 0.5.0)
|
48
|
-
rspec (3.1.0)
|
49
|
-
rspec-core (~> 3.1.0)
|
50
|
-
rspec-expectations (~> 3.1.0)
|
51
|
-
rspec-mocks (~> 3.1.0)
|
52
|
-
rspec-core (3.1.7)
|
53
|
-
rspec-support (~> 3.1.0)
|
54
|
-
rspec-expectations (3.1.2)
|
55
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
56
|
-
rspec-support (~> 3.1.0)
|
57
|
-
rspec-mocks (3.1.3)
|
58
|
-
rspec-support (~> 3.1.0)
|
59
|
-
rspec-support (3.1.2)
|
60
|
-
shellany (0.0.1)
|
61
|
-
slop (3.6.0)
|
62
|
-
thor (0.19.1)
|
63
|
-
timecop (0.7.1)
|
64
|
-
timers (4.0.1)
|
65
|
-
hitimes
|
66
|
-
|
67
|
-
PLATFORMS
|
68
|
-
ruby
|
69
|
-
|
70
|
-
DEPENDENCIES
|
71
|
-
guard-rspec (~> 4.5.0)
|
72
|
-
rake (~> 10.4.2)
|
73
|
-
rotp!
|
74
|
-
rspec (~> 3.1.0)
|
75
|
-
timecop (~> 0.7.1)
|