active_entry 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_entry.rb +8 -8
- data/lib/active_entry/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22965fa52ab633ba26b494ec4d4e75d9b21d3a0daa4274b38a4369c7af1d8a90
|
4
|
+
data.tar.gz: 9e06a922ddf9421f6e5355498af672e125c87a476b92f622d506363083f4bd02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 047a796891e8faca672e58b0dba5fe1b1cf06494880abc40411ee4f58aa9d24bb47d275c33ded3184b0884fbe71f78de263d4c1e7383b879601b7fcd4c717d41
|
7
|
+
data.tar.gz: 5e08a364e44dd87a8b9dfcb8923f2675e95ce7d75cb30b7439aa57fb325df81236cc0cb8760beb32bfaee69d2c46ba9a30454b0e896d443ac27ef1c1b13aecd2
|
data/lib/active_entry.rb
CHANGED
@@ -35,6 +35,10 @@ module ActiveEntry
|
|
35
35
|
else
|
36
36
|
is_authenticated = send decision_maker_to_use
|
37
37
|
end
|
38
|
+
|
39
|
+
# Tell #verify_authentication! that authentication
|
40
|
+
# has been performed.
|
41
|
+
@_authentication_done = true
|
38
42
|
|
39
43
|
# If the authenticated? method returns not true
|
40
44
|
# it raises the ActiveEntry::NotAuthenticatedError.
|
@@ -42,10 +46,6 @@ module ActiveEntry
|
|
42
46
|
# Use the .rescue_from method from ActionController::Base
|
43
47
|
# to catch the exception and show the user a proper error message.
|
44
48
|
raise ActiveEntry::NotAuthenticatedError.new(error) unless is_authenticated == true
|
45
|
-
|
46
|
-
# Tell #verify_authentication! that authentication
|
47
|
-
# has been performed.
|
48
|
-
@_authentication_done = true
|
49
49
|
end
|
50
50
|
|
51
51
|
# Verifies that #authorize! has been called in the controller.
|
@@ -80,15 +80,15 @@ module ActiveEntry
|
|
80
80
|
is_authorized = send(decision_maker_to_use)
|
81
81
|
end
|
82
82
|
|
83
|
+
# Tell #verify_authorization! that authorization
|
84
|
+
# has been performed.
|
85
|
+
@_authorization_done = true
|
86
|
+
|
83
87
|
# If the authorized? method does not return true
|
84
88
|
# it raises the ActiveEntry::NotAuthorizedError
|
85
89
|
#
|
86
90
|
# Use the .rescue_from method from ActionController::Base
|
87
91
|
# to catch the exception and show the user a proper error message.
|
88
92
|
raise ActiveEntry::NotAuthorizedError.new(error) unless is_authorized == true
|
89
|
-
|
90
|
-
# Tell #verify_authorization! that authorization
|
91
|
-
# has been performed.
|
92
|
-
@_authorization_done = true
|
93
93
|
end
|
94
94
|
end
|
data/lib/active_entry/version.rb
CHANGED