prx_auth-rails 1.4.0 → 1.4.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: 16f02bc649e6a16709b4a504649a925d3ead05209f8b3bd5c5e4aa28416bc57e
4
- data.tar.gz: fbc0d03cd674fa514541f23d9c6da6ac46db9031c110ddc3f604e66e073c9a8e
3
+ metadata.gz: 6af8c934d225009086d72c5503a3ad3db62b95c073063f019a31277c9eacc5bf
4
+ data.tar.gz: ab82780e90f78e9a3a31515078c9b7530354ad83bf3fd402a05c78514a0c762d
5
5
  SHA512:
6
- metadata.gz: 0d16efe0713bb453b5a4238f0ff6983898b5b5872d07396be5c66cf88ca7f4e2f23834a1abc8462c9a2cf0e8f40f1416d7e8cf82ec48611492deddcd52b8812c
7
- data.tar.gz: d3eacf2afcc2b9af1a741988bdb8e70c7c664672c487c6515ca336e65ac5f3db42adf63fc05b6fe89b39ef2ff6c45ad1e8dccaa0e5204b3bfba50d2388e6a07f
6
+ metadata.gz: 7af00c69f65cabbb5da5a1ea9fe0a79d85a3b004d9c437fa5c1a5539be22fc21ac346e2956d3f6cebbf07765e6b988d9d291c1b384bf8a56b78a8782d2f8f6af
7
+ data.tar.gz: c9a17a75d94bf7158b96147c877020f2093c07eb6e5ba345fb4ba37d6fd51df72fb2d5db4fc22ca04832c6954b5f7b9154252fb40a5de4e5878d006b096f02b6
@@ -38,6 +38,8 @@ module PrxAuth
38
38
  def account_name_for(id)
39
39
  id = id.to_i
40
40
 
41
+ session[PRX_ACCOUNT_NAME_MAPPING_KEY] ||= {}
42
+
41
43
  name =
42
44
  if session[PRX_ACCOUNT_NAME_MAPPING_KEY].has_key?(id)
43
45
  session[PRX_ACCOUNT_NAME_MAPPING_KEY][id]
@@ -1,5 +1,5 @@
1
1
  module PrxAuth
2
2
  module Rails
3
- VERSION = "1.4.0"
3
+ VERSION = "1.4.1"
4
4
  end
5
5
  end
@@ -32,9 +32,11 @@ module PrxAuth::Rails
32
32
 
33
33
  test 'create should validate a token and set the session variable' do
34
34
  @controller.stub(:validate_token, @stub_claims) do
35
- session[@nonce_session_key] = '123'
36
- post :create, params: @token_params, format: :json
37
- assert session['prx.auth']['id_token']['nonce'] == '123'
35
+ @controller.stub(:lookup_and_register_accounts_names, nil) do
36
+ session[@nonce_session_key] = '123'
37
+ post :create, params: @token_params, format: :json
38
+ assert session['prx.auth']['id_token']['nonce'] == '123'
39
+ end
38
40
  end
39
41
  end
40
42
 
@@ -48,12 +50,14 @@ module PrxAuth::Rails
48
50
 
49
51
  test 'create should reset the nonce after consumed' do
50
52
  @controller.stub(:validate_token, @stub_claims) do
51
- session[@nonce_session_key] = '123'
52
- post :create, params: @token_params, format: :json
53
-
54
- assert session[@nonce_session_key] == nil
55
- assert response.code == '302'
56
- assert response.body.match?(/after-sign-in-path/)
53
+ @controller.stub(:lookup_and_register_accounts_names, nil) do
54
+ session[@nonce_session_key] = '123'
55
+ post :create, params: @token_params, format: :json
56
+
57
+ assert session[@nonce_session_key] == nil
58
+ assert response.code == '302'
59
+ assert response.body.match?(/after-sign-in-path/)
60
+ end
57
61
  end
58
62
  end
59
63
 
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: 1.4.0
4
+ version: 1.4.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: 2021-02-16 00:00:00.000000000 Z
11
+ date: 2021-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -241,7 +241,7 @@ homepage: https://github.com/PRX/prx_auth-rails
241
241
  licenses:
242
242
  - MIT
243
243
  metadata: {}
244
- post_install_message:
244
+ post_install_message:
245
245
  rdoc_options: []
246
246
  require_paths:
247
247
  - lib
@@ -256,9 +256,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
256
256
  - !ruby/object:Gem::Version
257
257
  version: '0'
258
258
  requirements: []
259
- rubyforge_project:
260
- rubygems_version: 2.7.6.2
261
- signing_key:
259
+ rubygems_version: 3.0.3
260
+ signing_key:
262
261
  specification_version: 4
263
262
  summary: Rails integration for next generation PRX Authorization system.
264
263
  test_files: