devise-jwt 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +6 -1
- data/lib/devise/jwt/mapping_inspector.rb +5 -6
- data/lib/devise/jwt/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a807cc9c68dcd3c5a61ee4eb63c97ecf4c52025d
|
4
|
+
data.tar.gz: cb6935e57becd464816880ff753b9ce31bf4d1fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a2f45db11a0288188e93caee753cd5511f1fab947656cb8c047a15cde434f5fb4d8d57337fb377f65b9c75258facf714ffc797fc74d3fec46eb9924f759fccf
|
7
|
+
data.tar.gz: 37b791922e73c3f56c1f1fe1164b66e0d02f4cfcd891d63cb99f6f82d744bf2d111222587aeb4992bc1697d8521e6a01fb788bb78b3c3df0b6441d50ec13ce30
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
6
6
|
|
7
|
+
## [0.4.1] - 2017-10-03
|
8
|
+
### Fixed
|
9
|
+
- Do not generate double slash paths when one segment is blank
|
10
|
+
|
7
11
|
## [0.4.0] - 2017-08-07
|
8
12
|
|
9
13
|
### Added
|
data/README.md
CHANGED
@@ -7,6 +7,11 @@
|
|
7
7
|
|
8
8
|
`devise-jwt` is a [devise](https://github.com/plataformatec/devise) extension which uses [JWT](https://jwt.io/) tokens for user authentication. It follows [secure by default](https://en.wikipedia.org/wiki/Secure_by_default) principle.
|
9
9
|
|
10
|
+
This gem is just a replacement for cookies when these can't be used. As
|
11
|
+
cookies, a token expired with `devise-jwt` will mandatorily have an expiration
|
12
|
+
time. If you need that your users never sign out, you will be better off with a
|
13
|
+
solution using refresh tokens, like some implementation of OAuth2.
|
14
|
+
|
10
15
|
You can read about which security concerns this library takes into account and about JWT generic secure usage in the following series of posts:
|
11
16
|
|
12
17
|
- [Stand Up for JWT Revocation](http://waiting-for-dev.github.io/blog/2017/01/23/stand_up_for_jwt_revocation/)
|
@@ -21,7 +26,7 @@ You can read about which security concerns this library takes into account and a
|
|
21
26
|
Add this line to your application's Gemfile:
|
22
27
|
|
23
28
|
```ruby
|
24
|
-
gem 'devise-jwt', '~> 0.
|
29
|
+
gem 'devise-jwt', '~> 0.4.0'
|
25
30
|
```
|
26
31
|
|
27
32
|
And then execute:
|
@@ -27,9 +27,12 @@ module Devise
|
|
27
27
|
mapping.to
|
28
28
|
end
|
29
29
|
|
30
|
+
# :reek:FeatureEnvy
|
30
31
|
def path(name)
|
31
32
|
prefix, scope, request = path_parts(name)
|
32
|
-
[prefix, scope, request].
|
33
|
+
[prefix, scope, request].delete_if do |item|
|
34
|
+
!item || item.empty?
|
35
|
+
end.join('/').prepend('/').gsub('//', '/')
|
33
36
|
end
|
34
37
|
|
35
38
|
# :reek:ControlParameter
|
@@ -54,11 +57,7 @@ module Devise
|
|
54
57
|
prefix = mapping.instance_variable_get(:@path_prefix)
|
55
58
|
path = mapping.path
|
56
59
|
path_name = mapping.path_names[name]
|
57
|
-
[
|
58
|
-
prefix && prefix.gsub(%r{^/}, ''),
|
59
|
-
path,
|
60
|
-
path_name && !path_name.empty? ? path_name : nil
|
61
|
-
]
|
60
|
+
[prefix, path, path_name]
|
62
61
|
end
|
63
62
|
|
64
63
|
def routes?(name)
|
data/lib/devise/jwt/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise-jwt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marc Busqué
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: devise
|