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 +4 -4
- data/lib/keycard/controller_methods.rb +3 -3
- data/lib/keycard/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20806dbac1e389e47343361992335c53ff6ff4a7c6e9cd714c449a3ca0736c2d
|
4
|
+
data.tar.gz: b0f07e4956887268b88b7589115f717aa44981618f4fdf05ee68b2087a687453
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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] ||
|
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
|
data/lib/keycard/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2019-08-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sequel
|