devise-login-cookie 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/devise-login-cookie.gemspec
CHANGED
data/lib/devise-login-cookie.rb
CHANGED
@@ -7,20 +7,20 @@ module DeviseLoginCookie
|
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
10
|
-
def delete_cookie(record, warden, options)
|
11
|
-
cookie_options = Rails.configuration.session_options.slice(:path, :domain, :secure)
|
10
|
+
def self.delete_cookie(record, warden, options)
|
12
11
|
warden.cookies.delete("login_#{options[:scope]}_token", cookie_options)
|
13
12
|
end
|
14
|
-
module_function :delete_cookie
|
15
13
|
|
16
14
|
#########
|
17
15
|
protected
|
18
16
|
|
17
|
+
def cookie_options
|
18
|
+
Rails.configuration.session_options.slice(:path, :domain, :secure, :httponly)
|
19
|
+
end
|
20
|
+
|
19
21
|
def cookie_values(resource)
|
20
22
|
value = sign [ resource.id, Time.now.to_i ]
|
21
|
-
|
22
|
-
options.merge! :value => value
|
23
|
-
options
|
23
|
+
cookie_options.merge :value => value
|
24
24
|
end
|
25
25
|
|
26
26
|
def succeeded?
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 3
|
9
|
+
version: 0.0.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Paul Annesley
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-11-
|
17
|
+
date: 2010-11-17 00:00:00 +11:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -41,8 +41,7 @@ dependencies:
|
|
41
41
|
segments:
|
42
42
|
- 1
|
43
43
|
- 1
|
44
|
-
|
45
|
-
version: 1.1.0
|
44
|
+
version: "1.1"
|
46
45
|
type: :runtime
|
47
46
|
version_requirements: *id002
|
48
47
|
description: Devise sets a "remember_token" cookie for Remember Me logins, but not for standard logins. This extension sets a separate cookie on login, which makes sharing login state between same-domain web applications easier.
|