warden-jwt_auth 0.3.1 → 0.3.2
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 +1 -1
- data/lib/warden/jwt_auth.rb +1 -3
- data/lib/warden/jwt_auth/env_helper.rb +2 -1
- data/lib/warden/jwt_auth/hooks.rb +3 -2
- data/lib/warden/jwt_auth/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: e5ef370e2769321525a4f8d75188c541befe14f8
|
4
|
+
data.tar.gz: 719f327eca349ce320832fb46ca2057893feb2fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba697509f99e66bdc16a8eb7c4b3575ffefe7cc122e4ebf7ebc5a807eefbc2f6f5667e79b724b517b2b6078c731c3c3b955b7feadc71127b0d942664e4c29d68
|
7
|
+
data.tar.gz: 9b292cca9927bda28c92decf5170ef0f7c0f040e88770fb126591370c1b22fe49e9e27a8783e2844d0b81eda4dfb01d4811ffdff1822a6fa34402a647323f128
|
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.3.2] - 2017-12-23
|
8
|
+
### Fixed
|
9
|
+
- Do not couple `aud_header` env value to the setting
|
10
|
+
|
7
11
|
## [0.3.1] - 2017-12-11
|
8
12
|
### Added
|
9
13
|
- Ensure JWT scopes are not fetched from session. Workaround for
|
data/README.md
CHANGED
data/lib/warden/jwt_auth.rb
CHANGED
@@ -27,9 +27,7 @@ module Warden
|
|
27
27
|
|
28
28
|
# Request header which value will be encoded as `aud` claim in JWT. If
|
29
29
|
# the header is not present `aud` will be `nil`.
|
30
|
-
setting
|
31
|
-
('HTTP_' + value.upcase).tr('-', '_')
|
32
|
-
end
|
30
|
+
setting :aud_header, 'JWT_AUD'
|
33
31
|
|
34
32
|
# A hash of warden scopes as keys and user repositories as values. The
|
35
33
|
# values can be either the constants themselves or the constant names.
|
@@ -51,9 +51,10 @@ module Warden
|
|
51
51
|
end
|
52
52
|
|
53
53
|
# :reek:ManualDispatch
|
54
|
-
# :reek:
|
54
|
+
# :reek:UtilityFunction
|
55
55
|
def add_token_to_env(user, scope, env)
|
56
|
-
|
56
|
+
aud = EnvHelper.aud_header(env)
|
57
|
+
token, payload = UserEncoder.new.call(user, scope, aud)
|
57
58
|
user.on_jwt_dispatch(token, payload) if user.respond_to?(:on_jwt_dispatch)
|
58
59
|
env[PREPARED_TOKEN_ENV_KEY] = token
|
59
60
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: warden-jwt_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
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-12-
|
11
|
+
date: 2017-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-configurable
|