keycard 0.3.3 → 0.3.4

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: 5a73c4a3d99e36a4126bde8248bc3050037dc333a9a264b3169dff4a715d9a67
4
- data.tar.gz: 320cec317aa2b0fdf3d85bf02506db09267954484898e1b351d4bd69de2d7253
3
+ metadata.gz: 20806dbac1e389e47343361992335c53ff6ff4a7c6e9cd714c449a3ca0736c2d
4
+ data.tar.gz: b0f07e4956887268b88b7589115f717aa44981618f4fdf05ee68b2087a687453
5
5
  SHA512:
6
- metadata.gz: fa1c61ee6513b56dd213229ee7df793076b095a54b52865f31b07d293a4bc235e72a563900f1fee5aff693de0136ad30b8be7b8345e47606d760ca5474d8ad5a
7
- data.tar.gz: 86f727073283be6c122c3d4a0aaf7c5e738223306b08331779528087aecbe6bec1759b9fbaaa4819f033d1a3dc1fd0a4fd370d1107c4d5e068c9ec678fea9334
6
+ metadata.gz: '08205c7110db70d31ba8c6468bf2ac87e6e864296395a7f1903e4af39f15102c77fefc4e0d329baeafc9b4723dfacafe70ab1f5cda8070171ccd54f26a88e0dc'
7
+ data.tar.gz: '05588943f12c40204c4d01f0f1eda1463d0ac2c59b828d30a7c1c096f52c45c42cee9590a75ec785c24c9e985da81934f49af243d10eba28b1db8955d361d71b'
@@ -34,13 +34,13 @@ module Keycard
34
34
  def validate_session
35
35
  csrf_token = session[:_csrf_token]
36
36
  elapsed = begin
37
- Time.now - (session[:timestamp] || Time.at(0))
37
+ Time.now - Time.at(session[:timestamp] || 0)
38
38
  rescue StandardError
39
39
  session_timeout
40
40
  end
41
41
  reset_session if elapsed >= session_timeout
42
42
  session[:_csrf_token] = csrf_token
43
- session[:timestamp] = Time.now if session.key?(:timestamp)
43
+ session[:timestamp] = Time.now.to_i if session.key?(:timestamp)
44
44
  end
45
45
 
46
46
  # Require that some authentication method successfully identifies a user/account,
@@ -105,7 +105,7 @@ module Keycard
105
105
  reset_session
106
106
  session[:return_to] = return_url
107
107
  session[:user_id] = current_user.id
108
- session[:timestamp] = Time.now
108
+ session[:timestamp] = Time.now.to_i
109
109
  end
110
110
  end
111
111
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Keycard
4
- VERSION = "0.3.3"
4
+ VERSION = "0.3.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keycard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noah Botimer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-07-12 00:00:00.000000000 Z
12
+ date: 2019-08-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sequel