prx_auth-rails 2.1.0 → 3.0.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5be902ae2b7abfd4c01d28511d99931969fb3dce4aaff815fab35df005b99e07
|
4
|
+
data.tar.gz: dd3f5cf76251b17ceccaf307275401939e3d361ec01e215325674bff27aa5313
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09589b75ff43d4da201e8ee6ebe7caca75dcada77e8c959588a7cc2832998d71eae72bea7bc44e8d0b02db5fa2dceb5284841930502bfbc8926096bb47cf9b63'
|
7
|
+
data.tar.gz: 1bf07c4a6edb477714297edbd2e6a1ba9e3289ef28babe973816eaf6b8984157b534b4556ec5840b5c6d4d7c7dc134fab415a404cc3bfbf2716b91c994f466c2
|
@@ -116,7 +116,8 @@ module PrxAuth
|
|
116
116
|
|
117
117
|
def fetch_accounts(ids)
|
118
118
|
ids_param = ids.map(&:to_s).join(',')
|
119
|
-
fetch("/api/v1/accounts?account_ids=#{ids_param}")
|
119
|
+
resp = fetch("/api/v1/accounts?account_ids=#{ids_param}")
|
120
|
+
resp.try(:[], '_embedded').try(:[], 'prx:items') || []
|
120
121
|
end
|
121
122
|
|
122
123
|
def fetch_userinfo
|
@@ -115,7 +115,7 @@ module PrxAuth::Rails::Ext
|
|
115
115
|
with_stubbed_auth('some-jwt') do
|
116
116
|
one = {'id' => 1, 'type' => 'IndividualAccount', 'name' => 'One'}
|
117
117
|
three = {'id' => 3, 'type' => 'GroupAccount', 'name' => 'Three'}
|
118
|
-
body = {'
|
118
|
+
body = {'_embedded' => {'prx:items' => [one, three]}}
|
119
119
|
|
120
120
|
id_host = PrxAuth::Rails.configuration.id_host
|
121
121
|
stub_request(:get, "https://#{id_host}/api/v1/accounts?account_ids=1,2,3").
|
@@ -135,7 +135,7 @@ module PrxAuth::Rails::Ext
|
|
135
135
|
with_stubbed_auth('some-jwt') do
|
136
136
|
id_host = PrxAuth::Rails.configuration.id_host
|
137
137
|
stub_request(:get, "https://#{id_host}/api/v1/accounts?account_ids=2").
|
138
|
-
to_return(status: 200, body: JSON.generate({
|
138
|
+
to_return(status: 200, body: JSON.generate({'_embedded' => {'prx:items' => []}})).
|
139
139
|
times(3)
|
140
140
|
|
141
141
|
assert_equal @controller.accounts_for([2]), [nil]
|
@@ -150,7 +150,7 @@ module PrxAuth::Rails::Ext
|
|
150
150
|
two = {'id' => 2, 'type' => 'StationAccount', 'name' => 'Two'}
|
151
151
|
three = {'name' => 'Three'}
|
152
152
|
session[@account_mapping_key] = {1 => one, 3 => three}
|
153
|
-
body = {'
|
153
|
+
body = {'_embedded' => {'prx:items' => [two]}}
|
154
154
|
|
155
155
|
id_host = PrxAuth::Rails.configuration.id_host
|
156
156
|
stub_request(:get, "https://#{id_host}/api/v1/accounts?account_ids=2").
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prx_auth-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Rhoden
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -285,8 +285,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
285
285
|
- !ruby/object:Gem::Version
|
286
286
|
version: '0'
|
287
287
|
requirements: []
|
288
|
-
|
289
|
-
rubygems_version: 2.7.6.2
|
288
|
+
rubygems_version: 3.3.3
|
290
289
|
signing_key:
|
291
290
|
specification_version: 4
|
292
291
|
summary: Rails integration for next generation PRX Authorization system.
|