zaikio-jwt_auth 2.5.0 → 2.7.0
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/lib/zaikio/jwt_auth/directory_cache.rb +8 -1
- data/lib/zaikio/jwt_auth/version.rb +1 -1
- data/lib/zaikio/jwt_auth.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 24a55aebbcd25c1acc7790af95ca9d7eed70267607d498631681126cc1079702
|
|
4
|
+
data.tar.gz: 82dbef152c4af9353713a68093c1f685ae219171146a8ebcc66e22fc43468f23
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 36797c903b57e7c56c65d370461b4da805300359629e4a96fca596e8a33d1e66e3e27d3652503d3bcc30eea1369d6fc3c6906254dd7e57b4591f449f38cae79e
|
|
7
|
+
data.tar.gz: c18622291458097280a0ecd9d71a01dbd8138b6f3d469aadfe6dc261bb03a4f0a240262c834922174af33e66f6392522383dc62d79ab21418842ee6487e2e700
|
|
@@ -29,7 +29,14 @@ module Zaikio
|
|
|
29
29
|
# @returns Hash (in the happy path)
|
|
30
30
|
# @returns nil (if the cache is unavailable and the API is down)
|
|
31
31
|
def fetch(directory_path, options = {})
|
|
32
|
-
cache =
|
|
32
|
+
cache = begin
|
|
33
|
+
Zaikio::JWTAuth.configuration.cache.read("zaikio::jwt_auth::#{directory_path}")
|
|
34
|
+
rescue StandardError => e
|
|
35
|
+
Zaikio::JWTAuth.configuration.logger
|
|
36
|
+
.warn("Error reading DirectoryCache(#{directory_path}) from Cache, falling "\
|
|
37
|
+
"back to API: #{e.inspect}")
|
|
38
|
+
nil
|
|
39
|
+
end
|
|
33
40
|
|
|
34
41
|
return reload_or_enqueue(directory_path) unless cache
|
|
35
42
|
|
data/lib/zaikio/jwt_auth.rb
CHANGED
|
@@ -192,7 +192,8 @@ module Zaikio
|
|
|
192
192
|
|
|
193
193
|
def show_error_if_authorize_by_jwt_subject_type_fails(token_data)
|
|
194
194
|
if !self.class.authorize_by_jwt_subject_type ||
|
|
195
|
-
self.class.authorize_by_jwt_subject_type == token_data.subject_type
|
|
195
|
+
self.class.authorize_by_jwt_subject_type == token_data.subject_type ||
|
|
196
|
+
(self.class.authorize_by_jwt_subject_type == "Person" && token_data.on_behalf_of_id)
|
|
196
197
|
return
|
|
197
198
|
end
|
|
198
199
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zaikio-jwt_auth
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- crispymtn
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2023-
|
|
13
|
+
date: 2023-07-03 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: activejob
|