devise-jwt 0.5.7 → 0.5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/devise/jwt/test_helpers.rb +9 -1
- 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: 46efde6e95a9ddba08e9fddd4fd941c8fe9e016e
|
4
|
+
data.tar.gz: d407e8b630b65416737cb847581e9de9485ff263
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed2387cf2a8f06571220d684fdd077fc7de1f9529299fd9f5e7c5493a58d57265d6b6d719185ccb542700ab9320ceb8532beb9ed62a790258a66cc94a1c8ab24
|
7
|
+
data.tar.gz: 5669e5195cbf8836ce9b650ea3d1c13af79ee5f9daf0ecd14a1929cf5d4283c263bc8ff003f669f644ec737853f6ccf2f31c6ef993d520ccbf96b0d564c273cd
|
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.5.8] - 2018-09-07
|
8
|
+
### Fixed
|
9
|
+
- Fix test helper to persist whitelisted tokens.
|
10
|
+
|
7
11
|
## [0.5.7] - 2018-06-22
|
8
12
|
### Added
|
9
13
|
- Use `primary_key` instead of `id` to fetch resource.
|
data/README.md
CHANGED
@@ -7,6 +7,10 @@ module Devise
|
|
7
7
|
# Returns headers with a valid token in the `Authorization` header
|
8
8
|
# added.
|
9
9
|
#
|
10
|
+
# Side effects could happen if you have implemented
|
11
|
+
# `on_jwt_dispatch` method on the user model (as it happens in
|
12
|
+
# the whitelist revocation strategy).
|
13
|
+
#
|
10
14
|
# Be aware that a fresh copy of `headers` is returned with the new
|
11
15
|
# key/value pair added, instead of modifying given argument.
|
12
16
|
#
|
@@ -18,12 +22,16 @@ module Devise
|
|
18
22
|
# the header name configured in `Devise::JWT.config.aud_header`.
|
19
23
|
#
|
20
24
|
# :reek:LongParameterList
|
25
|
+
# :reek:ManualDispatch
|
21
26
|
def self.auth_headers(headers, user, scope: nil, aud: nil)
|
22
27
|
scope ||= Devise::Mapping.find_scope!(user)
|
23
28
|
aud ||= headers[Warden::JWTAuth.config.aud_header]
|
24
|
-
token,
|
29
|
+
token, payload = Warden::JWTAuth::UserEncoder.new.call(
|
25
30
|
user, scope, aud
|
26
31
|
)
|
32
|
+
if user.respond_to?(:on_jwt_dispatch)
|
33
|
+
user.on_jwt_dispatch(token, payload)
|
34
|
+
end
|
27
35
|
Warden::JWTAuth::HeaderParser.to_headers(headers, token)
|
28
36
|
end
|
29
37
|
end
|
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.5.
|
4
|
+
version: 0.5.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marc Busqué
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: devise
|