active_model_otp 2.3.0 → 2.3.1
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/active_model/one_time_password.rb +1 -0
- data/lib/active_model/otp/version.rb +1 -1
- data/test/one_time_password_test.rb +17 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 906ff23803a070afb3df376eb45d4314640c4f4012028d7b7bfc16d9263def54
|
4
|
+
data.tar.gz: efde68de226fb2d7a5b2230fc19958502e678776781419ff89532d19d5e9682e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2805bf0a8dc09e6699b9617b60f662b4ff50c82c4f952d9e0fdc2a9c2c6c5a5829ea42ceb9bb2167d64d83c050a79272b3224cc0e21ecb93069fde5cc826f9ba
|
7
|
+
data.tar.gz: c893d4e40737f2a724e912dd84edfc1cbd3886515757596582436d2694d2ab4836ae7251a522e66c3ac95f31fef4c52f1d1f47836d09d39cb7d259c6c335c77d
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[](https://github.com/heapsource/active_model_otp/actions/workflows/active_model_otp.yml)
|
2
2
|
[](http://badge.fury.io/rb/active_model_otp)
|
3
3
|
[](https://houndci.com)
|
4
4
|
|
@@ -33,6 +33,23 @@ class OtpTest < MiniTest::Test
|
|
33
33
|
assert @visitor.authenticate_otp(code)
|
34
34
|
end
|
35
35
|
|
36
|
+
def test_authenticate_with_otp_passing_false_or_empty_codes
|
37
|
+
refute @user.authenticate_otp(nil)
|
38
|
+
refute @user.authenticate_otp('')
|
39
|
+
|
40
|
+
refute @visitor.authenticate_otp(nil)
|
41
|
+
refute @visitor.authenticate_otp('')
|
42
|
+
|
43
|
+
refute @member.authenticate_otp(nil)
|
44
|
+
refute @member.authenticate_otp('')
|
45
|
+
|
46
|
+
refute @ar_user.authenticate_otp(nil)
|
47
|
+
refute @ar_user.authenticate_otp('')
|
48
|
+
|
49
|
+
refute @opt_in.authenticate_otp(nil)
|
50
|
+
refute @opt_in.authenticate_otp('')
|
51
|
+
end
|
52
|
+
|
36
53
|
def test_counter_based_otp
|
37
54
|
code = @member.otp_code
|
38
55
|
assert @member.authenticate_otp(code)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_model_otp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guillermo Iguaran
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-10-22 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activemodel
|