devise_userbin 0.5.3 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e314c1646c87d1007135c071f79d2f18c9b2778
|
4
|
+
data.tar.gz: 16fe4f53110ac4c15476aa0eec98e4d672bdd81e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82836adb7d582a7513a0b605ede8bdef77cff96417b00bfd454489001a3a1167ff167c35255f206f9a27449c0ed22ac71de0d0d7916f0bacbd6fa97ad53c1a2e
|
7
|
+
data.tar.gz: bdeffb6964effbe01000bc63f4cb135e0494e7be580eb800e3e55042b1b41fb410d57f2d6933f35933e731be798f819ee8e2e34eff6f78fc58962f28c5411773
|
@@ -8,12 +8,15 @@ class Devise::DeviseUserbinController < DeviseController
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def new
|
11
|
-
challenge =
|
12
|
-
|
11
|
+
challenge = userbin.challenges.create
|
12
|
+
Devise.mappings.keys.flatten.any? do |scope|
|
13
|
+
redirect_to send(
|
14
|
+
"edit_#{scope}_two_factor_authentication_path", challenge.id)
|
15
|
+
end
|
13
16
|
end
|
14
17
|
|
15
18
|
def edit
|
16
|
-
@challenge =
|
19
|
+
@challenge = userbin.challenges.find(params[:id])
|
17
20
|
|
18
21
|
# Prevent "undefined method `errors' for nil:NilClass"
|
19
22
|
self.resource = resource_class.new
|
@@ -26,9 +29,9 @@ class Devise::DeviseUserbinController < DeviseController
|
|
26
29
|
code = params.require(:code)
|
27
30
|
|
28
31
|
begin
|
29
|
-
|
32
|
+
userbin.challenges.verify(challenge_id, response: code)
|
30
33
|
|
31
|
-
|
34
|
+
userbin.trust_device if params[:trust_device]
|
32
35
|
|
33
36
|
Devise.mappings.keys.flatten.any? do |scope|
|
34
37
|
redirect_to after_sign_in_path_for(scope)
|
@@ -49,7 +52,7 @@ class Devise::DeviseUserbinController < DeviseController
|
|
49
52
|
private
|
50
53
|
|
51
54
|
def return_not_found
|
52
|
-
unless
|
55
|
+
unless userbin.mfa_in_progress?
|
53
56
|
redirect_to after_sign_in_path_for(resource_name)
|
54
57
|
end
|
55
58
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise_userbin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johan Brissmyr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: devise
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.6.1
|
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: 1.
|
40
|
+
version: 1.6.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|