quo_vadis 2.1.1 → 2.1.2
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/app/models/quo_vadis/account.rb +1 -0
- data/lib/quo_vadis/version.rb +1 -1
- data/test/models/recovery_code_test.rb +7 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b81cb83f9cd0b6bb6e9af4015dba59b5cef0f5c3fccd5a82ee6d7e1bbc5768a
|
4
|
+
data.tar.gz: 8a9f5f0c013ec89de6849e9ddb3393fee46b84a2d08b20e606126cf97bba8032
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7b5e766f22e55e5bc269d00e6fb9132cc54ba2523a72996d0d7da478dbf0662764d29265c591f5847d5f2cfaeaca1e78fb4d48fb8fecb24af0bee9e9c2047e2
|
7
|
+
data.tar.gz: 47bf8bba82c90f3b7527be6a316ec8f9a4b229077a6846454abecebd6d2ae29910f7e416635d9cc1d54e3b99fe87d4c7d0ca871741907f1987d1ee42bf79994b
|
data/README.md
CHANGED
@@ -292,7 +292,7 @@ After authenticating the user will be redirected to the first of these that exis
|
|
292
292
|
|
293
293
|
If you do not want 2FA at all, set `QuoVadis.two_factor_authentication_mandatory false` in your configuration and skip the rest of this section.
|
294
294
|
|
295
|
-
If you do want 2FA, you can choose whether it is
|
295
|
+
If you do want 2FA, you can choose whether it is mandatory or optional for your users by setting `QuoVadis.two_factor_authentication_mandatory <true|false>` in your configuration.
|
296
296
|
|
297
297
|
Use `before_action :require_two_factor_authentication` in your controllers (which supersedes `:require_password_authentication`). This will require the user, after authenticating with their password, to authenticate with 2FA – when 2FA is mandatory, or when it is optional and the user has set up 2FA.
|
298
298
|
|
data/lib/quo_vadis/version.rb
CHANGED
@@ -42,13 +42,19 @@ class RecoveryCodeTest < ActiveSupport::TestCase
|
|
42
42
|
test 'generate a fresh set of codes' do
|
43
43
|
account = @user.qv_account
|
44
44
|
codes = []
|
45
|
-
assert_difference 'QuoVadis::RecoveryCode.count', 5 do
|
45
|
+
assert_difference 'QuoVadis::RecoveryCode.count', (-1 + 5) do
|
46
46
|
codes = account.generate_recovery_codes
|
47
47
|
end
|
48
48
|
assert_equal 5, codes.length
|
49
|
+
assert_equal 5, account.recovery_codes.count
|
49
50
|
codes.each do |code|
|
50
51
|
assert_instance_of String, code
|
51
52
|
end
|
53
|
+
|
54
|
+
new_codes = account.generate_recovery_codes
|
55
|
+
assert_equal 5, new_codes.length
|
56
|
+
assert_equal 5, account.recovery_codes.count
|
57
|
+
refute_equal new_codes, codes
|
52
58
|
end
|
53
59
|
|
54
60
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quo_vadis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Stewart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -224,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
224
224
|
- !ruby/object:Gem::Version
|
225
225
|
version: '0'
|
226
226
|
requirements: []
|
227
|
-
rubygems_version: 3.1.
|
227
|
+
rubygems_version: 3.1.4
|
228
228
|
signing_key:
|
229
229
|
specification_version: 4
|
230
230
|
summary: Multifactor authentication for Rails 6.
|