devise-jwt-cookie 0.1.0 → 0.2.0

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: c651a98107436a37d4411225bda3f600539a4732c3db026afb97f36ea0f076c9
4
- data.tar.gz: d2f98c4f2fffbac7c616f1d01df9b22d941ae2242ca5fbab095a440ea665c9db
3
+ metadata.gz: 81e6f3af0d1646f1720c8d748d5bb5a61c800256257c9483be4714a530c65501
4
+ data.tar.gz: 6266de7bdd7e127ddee28d82e41189e39cdc8eefd1e2f87edd2678dcb40dd64a
5
5
  SHA512:
6
- metadata.gz: 4662d4091164b5c24c41ab6c178733473d6b4557a9db394a8f9d35d0fa1ee6ba828b87a6202fdb26e1e6a106853fc3501a3358bc6258ea946b457db1bf330c3f
7
- data.tar.gz: 0da03f68dabf6d4e26d0e94f699fa10ea30a0ced2cb37919e2eb10a341038431ed45ad67291698de8d372d15ba7f5dc37b3d1fc51aeea9ec53e3f8daf829922d
6
+ metadata.gz: beb8781ebbe675e9eabe22902fed8a1467b227bf5688e7592a2b612d8cddb19c9947072a37615b42a74c6a8ac21afa7e71023d2a94ce3dd700e8c73880fc193e
7
+ data.tar.gz: b68f139960bfe9973da858f1dcd48360b4b26ac3fb6be0abfe45a43222211dea16005948400fbc00960563ebdf09237019fc8b12a072e7524586013124cc39d8
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ *.gem
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.5.7
data/Gemfile.lock CHANGED
@@ -2,7 +2,7 @@ PATH
2
2
  remote: .
3
3
  specs:
4
4
  devise-jwt-cookie (0.1.0)
5
- devise-jwt (~> 0.6.0)
5
+ devise-jwt (~> 0.6)
6
6
  dry-auto_inject (~> 0.6)
7
7
  dry-configurable (~> 0.9, < 0.11)
8
8
 
data/README.md CHANGED
@@ -53,3 +53,7 @@ The name of the cookie. Defaults to `access_token`.
53
53
 
54
54
  The domain the cookie should be issued to. Will be omitted if not set.
55
55
 
56
+ #### secure
57
+
58
+ If a secure cookie should be set, this means the cookie must be sent over a secure connection. Defaults to true.
59
+
@@ -15,6 +15,7 @@ module Devise
15
15
  extend Dry::Configurable
16
16
 
17
17
  setting :name, 'access_token'
18
+ setting :secure, true
18
19
  setting :domain
19
20
 
20
21
  Import = Dry::AutoInject(config)
@@ -2,13 +2,14 @@ module Devise
2
2
  module JWT
3
3
  module Cookie
4
4
  class CookieHelper
5
- include Cookie::Import['name', 'domain']
5
+ include Cookie::Import['name', 'domain', 'secure']
6
6
 
7
7
  def build(token)
8
8
  res = {
9
9
  value: token,
10
10
  path: '/',
11
- httponly: true
11
+ httponly: true,
12
+ secure: secure
12
13
  }
13
14
  res[:domain] = domain if domain.present?
14
15
  [name, res]
@@ -1,7 +1,7 @@
1
1
  module Devise
2
2
  module JWT
3
3
  module Cookie
4
- VERSION = '0.1.0'
4
+ VERSION = '0.2.0'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise-jwt-cookie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Niels van der Zanden
@@ -192,6 +192,8 @@ executables: []
192
192
  extensions: []
193
193
  extra_rdoc_files: []
194
194
  files:
195
+ - ".gitignore"
196
+ - ".ruby-version"
195
197
  - Gemfile
196
198
  - Gemfile.lock
197
199
  - README.md