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.
@@ -20,6 +20,6 @@ Gem::Specification.new do |s|
20
20
  s.require_paths = ["lib"]
21
21
 
22
22
  s.add_dependency("signed_json")
23
- s.add_runtime_dependency("devise", ["~> 1.1.0"])
23
+ s.add_runtime_dependency("devise", ["~> 1.1"])
24
24
 
25
25
  end
@@ -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
- options = Rails.configuration.session_options.slice(:path, :domain, :secure)
22
- options.merge! :value => value
23
- options
23
+ cookie_options.merge :value => value
24
24
  end
25
25
 
26
26
  def succeeded?
@@ -1,3 +1,3 @@
1
1
  module DeviseLoginCookie
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
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-07 00:00:00 +11:00
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
- - 0
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.