lockie 0.3.0 → 0.3.1

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: f263a01d6643e64e44c24073bba5299d2e676bc4ec94e933b8237fcdb504db05
4
- data.tar.gz: 6c1be8dfb1a8db8140a4722297163dbed092eca4cd14366b77f25b0cf54685f0
3
+ metadata.gz: 4891f7485ad02efb026b823bc53c1975f05661eca97414310fdf89a93305188d
4
+ data.tar.gz: 4ba661f6c8e3e40415695f9fecd2fe7fb7e3d9d2ef5542af7420792575c7d399
5
5
  SHA512:
6
- metadata.gz: 616c53926c05e0da9bccb86e1bd01e715f6064793a92ffff47cb851e4611c3df23b5e4e125e1f18d1e8964b6f309b8a0b80619fa6477059fe2dd263409f6922e
7
- data.tar.gz: 197cc104b9afe2f0f42f5aeb26150c6286fe3aa64fffa61251a58455a0fc525c9d9a496be5dc55f40af64454b3ecdf662f8d52207f6045d965dfe3a179bf3a1b
6
+ metadata.gz: a1d92c0e6f02c98dcd46adc5fdb9559e9593f7c6f90f513eca1569d00ea77fa14c6b58afa41470806477b57bb786b191cd9e29d5fd3e9b1dbdd351bc46186f16
7
+ data.tar.gz: 70ae39adb0997816279aac2880cdc274dd1b2e1e253ac4008aa7bcd0cd50348fc1a6ac2731c9714c96a9a857b0a04e5f62ddfb976052393f739e464a2960a5b6
data/README.md CHANGED
@@ -9,7 +9,7 @@ A drop-in, none assuming warden based Password and JWT authentication for Rails
9
9
  Add this line to your application's Gemfile:
10
10
 
11
11
  ```ruby
12
- gem 'lockie', '~> 0.2.14'
12
+ gem 'lockie', '~> 0.3.1'
13
13
  ```
14
14
 
15
15
  And then execute:
@@ -22,6 +22,11 @@ module Lockie
22
22
  end
23
23
  end
24
24
 
25
+ Warden::Manager.after_authentication do |record, warden, options|
26
+ session_key = "warden.uls-#{record.class.name.underscore}-#{record.id}"
27
+ warden.request.session[session_key] = (Time.now + Lockie.config.session_timeout).to_s
28
+ end
29
+
25
30
  Warden::Manager.after_set_user do |record, warden, options|
26
31
  session_key = "warden.uls-#{record.class.name.underscore}-#{record.id}"
27
32
  last_session_access = warden.request.session[session_key]
@@ -1,3 +1,3 @@
1
1
  module Lockie
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lockie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Melvin Sembrano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-24 00:00:00.000000000 Z
11
+ date: 2020-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails