devise_userbin 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/devise_userbin/hooks.rb +2 -2
- data/lib/devise_userbin/version.rb +1 -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: 1b8601ece7f4cf2de6ff13fce2202528c5313c60
|
4
|
+
data.tar.gz: e16a893a37b12a718c2099839b431978ed00adf0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9ce7f523b2d522076222fb389ae7b8d012d0225024ee8952f6f9a572e347e63bdaceaf8cd70e6e79bed9c774236e2d0e3abebb4224c388ac451b160e34d5ba1
|
7
|
+
data.tar.gz: 99a4158de471b9f21d6101d4952f09e289874865ce2259c0a5ddacd7f45e26bb09b7248350d8dabb9f70df0c9cc89526d7b18ddf721eaccc8d1e291f2f140f3b
|
data/lib/devise_userbin/hooks.rb
CHANGED
@@ -9,13 +9,13 @@ Warden::Manager.before_logout do |record, warden, opts|
|
|
9
9
|
if record.respond_to?(:userbin_id)
|
10
10
|
userbin = warden.request.env['userbin']
|
11
11
|
userbin.logout
|
12
|
-
userbin.track(name: 'logout.succeeded')
|
12
|
+
userbin.track(user_id: record._userbin_id, name: 'logout.succeeded')
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
16
|
# Track login.failed
|
17
17
|
Warden::Manager.before_failure do |env, opts|
|
18
|
-
if opts[:action] == 'unauthenticated'
|
18
|
+
if opts[:action] == 'unauthenticated' && opts[:recall]
|
19
19
|
userbin = env['userbin']
|
20
20
|
userbin.track(name: 'login.failed')
|
21
21
|
end
|