tfa 0.0.4 → 0.0.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 +4 -4
- data/README.md +1 -1
- data/lib/tfa/version.rb +1 -1
- data/spec/lib/show_command_spec.rb +1 -1
- data/spec/lib/totp_command_spec.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9a4ebff8bb56416e64852152dbcbfb0b9dd3d0fc
|
|
4
|
+
data.tar.gz: cf0d9758601f1253a8bdd1e22edd65efea632c0d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a6c7d6ddcd7961d5fd040871525d46807ab44c8c1bf81f3ea73f246a7a24b7c5a49a16fcc95337f1278f65677058c83068e6b0d7d1765db348a865c0824c79e0
|
|
7
|
+
data.tar.gz: a402ef2d8702b1793e98fb04a6e3b4a5f83fae2226e1776262e19b41f99c93370fdeaf6f49eb0a8d808e29b243813aa36847cb1bb321c3e8a4b28efd663ce2ef
|
data/README.md
CHANGED
data/lib/tfa/version.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module TFA
|
|
2
2
|
describe ShowCommand do
|
|
3
3
|
subject { ShowCommand.new(storage) }
|
|
4
|
-
let(:storage) { Storage.new(
|
|
4
|
+
let(:storage) { Storage.new(SecureRandom.uuid) }
|
|
5
5
|
|
|
6
6
|
describe "#run" do
|
|
7
7
|
context "when looking up the secret for a specific key" do
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
module TFA
|
|
2
2
|
describe TotpCommand do
|
|
3
3
|
subject { TotpCommand.new(storage) }
|
|
4
|
-
let(:secret) { ::ROTP::Base32.random_base32 }
|
|
5
4
|
let(:storage) { Storage.new(Tempfile.new('test').path) }
|
|
5
|
+
let(:storage) { Storage.new(SecureRandom.uuid) }
|
|
6
6
|
|
|
7
7
|
def code_for(secret)
|
|
8
8
|
::ROTP::TOTP.new(secret).now
|
|
@@ -10,6 +10,8 @@ module TFA
|
|
|
10
10
|
|
|
11
11
|
describe "#run" do
|
|
12
12
|
context "when a single key is given" do
|
|
13
|
+
let(:secret) { ::ROTP::Base32.random_base32 }
|
|
14
|
+
|
|
13
15
|
it "returns a time based one time password for the authentication secret given" do
|
|
14
16
|
storage.save('development', secret)
|
|
15
17
|
expect(subject.run(["development"])).to eql(code_for(secret))
|