prx_auth-rails 2.1.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3212721cc8a3569576581017749f0af4ebca8c3c6c50684f9d88587057e9517b
|
4
|
+
data.tar.gz: 41f92ebcf2c167cb48d00c39319a1a6663d9a7203aa9c6c7d69007f8230ba011
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3fa282bf2f549e40761da8b04ddb3944c20492818598bc2d391e7cc5e79b032a41c2d5914b5b2f7f70a3401492548149eb308b08b030efbcd87d817b05f7698
|
7
|
+
data.tar.gz: 6e25421712eb18d89fa5aa6fda01eb1641262f41ae294aa39630755ef342a743ecbd6d02bd985469eb56db25d20e4e0121696b5de8338219edf75d9597f16363
|
@@ -4,7 +4,7 @@ module PrxAuth::Rails
|
|
4
4
|
class SessionsController < ApplicationController
|
5
5
|
include PrxAuth::Rails::Engine.routes.url_helpers
|
6
6
|
|
7
|
-
skip_before_action :authenticate
|
7
|
+
skip_before_action :authenticate!, raise: false
|
8
8
|
|
9
9
|
before_action :set_nonce!, only: [:new, :show]
|
10
10
|
before_action :set_after_sign_in_path
|
@@ -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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Rhoden
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -270,7 +270,7 @@ homepage: https://github.com/PRX/prx_auth-rails
|
|
270
270
|
licenses:
|
271
271
|
- MIT
|
272
272
|
metadata: {}
|
273
|
-
post_install_message:
|
273
|
+
post_install_message:
|
274
274
|
rdoc_options: []
|
275
275
|
require_paths:
|
276
276
|
- lib
|
@@ -285,9 +285,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
285
285
|
- !ruby/object:Gem::Version
|
286
286
|
version: '0'
|
287
287
|
requirements: []
|
288
|
-
|
289
|
-
|
290
|
-
signing_key:
|
288
|
+
rubygems_version: 3.1.4
|
289
|
+
signing_key:
|
291
290
|
specification_version: 4
|
292
291
|
summary: Rails integration for next generation PRX Authorization system.
|
293
292
|
test_files:
|