uber_login 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/uber_login/storage.rb +1 -1
- data/lib/uber_login/version.rb +1 -1
- data/lib/uber_login.rb +9 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTkxZWIxMGZiMzM0MTVjMzE2YTFkODEyMTk5NTQ4MWVhMTg0ZmU4MA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTRiY2EwNjc3Njk0MDBlYjQ2YWYwZjkzNmUwZDU2MjRhNDM3OGQ0ZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NWFlODA0OThhOGIxYzgzNGY0MWI5OTM4Njc0ZmE1OTgzMzA0MjVlNzFlMzEw
|
10
|
+
ODZhMDJhZTVmMzMzYTdkN2I0ODYxNzc2NDhjYTcwYTc1NTEwOTc0YjZjNDEw
|
11
|
+
MmU5YjNhZjllN2VlY2MxODljMzk0MWFjNTE4YjczNzE1ZGFiZDc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZGMyOGJjYzVhYmQ4YzlmMzFhOGU1YWJhN2Y0MTZjYzZhMjFlNGM0OWFiMTgx
|
14
|
+
NjVkNzZmODUzODEzNDM3OWU1NTFhZWFmZmU0NmUwMWMwNmVjNDIzYTU5ZjZm
|
15
|
+
MDdlMTI1YWM1N2Q4ZDVmNzQyYTMxYmM5ODczZGJiOWYxZjg5ZjU=
|
data/lib/uber_login/storage.rb
CHANGED
data/lib/uber_login/version.rb
CHANGED
data/lib/uber_login.rb
CHANGED
@@ -43,17 +43,18 @@ module UberLogin
|
|
43
43
|
def login(user, remember = false)
|
44
44
|
logout_all unless UberLogin.configuration.allow_multiple_login
|
45
45
|
@login_from_cookies = false
|
46
|
+
uid = get_uid(user)
|
46
47
|
|
47
48
|
run_callbacks :login do
|
48
49
|
if strong_sessions or remember
|
49
|
-
composite = generate_and_save_token(
|
50
|
-
cookie_manager.persistent_login(
|
50
|
+
composite = generate_and_save_token(uid)
|
51
|
+
cookie_manager.persistent_login(uid, composite) if remember
|
51
52
|
else
|
52
53
|
composite = nil
|
53
54
|
end
|
54
55
|
|
55
56
|
reset_session
|
56
|
-
session_manager.login(
|
57
|
+
session_manager.login(uid, composite)
|
57
58
|
end
|
58
59
|
end
|
59
60
|
|
@@ -194,6 +195,11 @@ module UberLogin
|
|
194
195
|
UberLogin.configuration.strong_sessions
|
195
196
|
end
|
196
197
|
|
198
|
+
def get_uid(user)
|
199
|
+
uid = user.id
|
200
|
+
uid = uid.to_s if uid.is_a? BSON::ObjectId
|
201
|
+
end
|
202
|
+
|
197
203
|
def current_sequence
|
198
204
|
TokenEncoder.sequence(cookies[:ulogin] || session[:ulogin])
|
199
205
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uber_login
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francesco Boffa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: useragent
|