authie 3.1.1 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4941a730d79a7366a0bc9918c87cbea607073a673d7ee2869f7d14c0b74efe74
4
- data.tar.gz: 90575465e60a29257aeb3181715a9b82e1ca2b9c1cc10c03bee504796983e3b0
3
+ metadata.gz: 5218eaaf13f33cbb5549d8a960346afce6fee2c7a1f6d012a700b194a767fe01
4
+ data.tar.gz: af46e46d5705509861615f5c24d944db378735583392668d718ebd94266817aa
5
5
  SHA512:
6
- metadata.gz: 5b9acde1ac324fd41d3850a4efe44ecbe9c7c6cb045c0400707182c93fabda16fb20f33f409a7ab086a9fbd7c2e013415522b819da6b9d48ce9d62831c091177
7
- data.tar.gz: 195f23c7ca8403180f322093d34593f05015c4aaad58ac836e86058b0f137ad1ed23cc62687243afa00fa4c062479b3a1b502870e0acdaff22a24d3d9adac55a
6
+ metadata.gz: cb4192a20e425bcbf33ec6225cd5b5b4e3579a2afc5a636b33e59b9d833c588012882d596530b02980a69d1aa34de0a56c81bae42d369566fa14e43f95d62666
7
+ data.tar.gz: 25d48500830186409ae772707ac22669a559bc9a578c5b590c67dcdf83b6fefd428b2c8ad5d8872e8900f3d873395a60519fe1c091dd08e506be04e0d8eb56f2
@@ -20,6 +20,11 @@ module Authie
20
20
  @user_relationship_options ||= {}
21
21
  end
22
22
 
23
+ def browser_id_cookie_name
24
+ @browser_id_cookie_name || :browser_id
25
+ end
26
+ attr_writer :browser_id_cookie_name
27
+
23
28
  end
24
29
 
25
30
  def self.config
@@ -7,10 +7,15 @@ module Authie
7
7
 
8
8
  # Set a random browser ID for this browser.
9
9
  def set_browser_id
10
- until cookies[:browser_id]
10
+ until cookies[Authie.config.browser_id_cookie_name]
11
11
  proposed_browser_id = SecureRandom.uuid
12
12
  unless Session.where(:browser_id => proposed_browser_id).exists?
13
- cookies[:browser_id] = {:value => proposed_browser_id, :expires => 20.years.from_now}
13
+ cookies[Authie.config.browser_id_cookie_name] = {
14
+ :value => proposed_browser_id,
15
+ :expires => 5.years.from_now,
16
+ :httponly => true,
17
+ :secure => @controller.request.ssl?
18
+ }
14
19
  end
15
20
  end
16
21
  end
@@ -1,3 +1,3 @@
1
1
  module Authie
2
- VERSION = '3.1.1'
2
+ VERSION = '3.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authie
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Cooke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-19 00:00:00.000000000 Z
11
+ date: 2018-03-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A Rails library for storing user sessions in a backend database
14
14
  email: