uber_login 2.4.0 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uber_login/token_encoder.rb +11 -3
- data/lib/uber_login/version.rb +1 -1
- data/lib/uber_login.rb +7 -3
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 486ae4c5cd1a314ac877a4d84773fb38077a1a22
|
4
|
+
data.tar.gz: 17a9693c253f50c0cba6a99b5af58e756b70aa05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7deb1c6e5071694721e25d65afedd998fc309a44695b3ef38cd067fcba40b2c1e71d604597ae235327951ac943869c0b02e5f9b9d1a643d5f1cde8599b28a8f2
|
7
|
+
data.tar.gz: a972299c2877d62da55d80122bc4844478a7426016eac0749d9ba2dd2485099d4da74cf27c7b9fd62ab3fd33d0043f5d1a1174dd9b040a1fe173c5797db6f481
|
@@ -17,15 +17,23 @@ module UberLogin
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def decode(composite)
|
20
|
-
composite
|
20
|
+
if composite
|
21
|
+
composite.split(':')
|
22
|
+
else
|
23
|
+
[ nil, nil ]
|
24
|
+
end
|
21
25
|
end
|
22
26
|
|
23
27
|
def sequence(composite)
|
24
|
-
|
28
|
+
if composite
|
29
|
+
decode(composite)[0]
|
30
|
+
end
|
25
31
|
end
|
26
32
|
|
27
33
|
def token(composite)
|
28
|
-
|
34
|
+
if composite
|
35
|
+
decode(composite)[1]
|
36
|
+
end
|
29
37
|
end
|
30
38
|
|
31
39
|
def token_hash(composite)
|
data/lib/uber_login/version.rb
CHANGED
data/lib/uber_login.rb
CHANGED
@@ -172,8 +172,10 @@ module UberLogin
|
|
172
172
|
# the current session.
|
173
173
|
def delete_from_database(sequence = nil)
|
174
174
|
sequence = sequence || current_sequence
|
175
|
-
|
176
|
-
|
175
|
+
if sequence
|
176
|
+
token = Storage.find(cookies[:uid] || session[:uid], sequence)
|
177
|
+
token.destroy if token
|
178
|
+
end
|
177
179
|
end
|
178
180
|
|
179
181
|
def set_user_data(row)
|
@@ -209,6 +211,8 @@ module UberLogin
|
|
209
211
|
end
|
210
212
|
|
211
213
|
def current_sequence
|
212
|
-
|
214
|
+
if cookies[:ulogin] || session[:ulogin]
|
215
|
+
TokenEncoder.sequence(cookies[:ulogin] || session[:ulogin])
|
216
|
+
end
|
213
217
|
end
|
214
218
|
end
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uber_login
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.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: 2015-
|
11
|
+
date: 2015-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: useragent
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.10.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.10.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
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
40
|
version: '0'
|
41
41
|
description: Login and logout management with secure "remember me" capabilities and
|
@@ -70,12 +70,12 @@ require_paths:
|
|
70
70
|
- lib
|
71
71
|
required_ruby_version: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
|
-
- -
|
78
|
+
- - ">="
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|