mauth-client 6.4.1 → 6.4.3

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: b9219adefc5bedb36c4994be6309d39c8cb2b2e67a91d8a12f2119caf288df26
4
- data.tar.gz: aff48af8ae57b3a4cd12f094abe3ac5c002379177465f1870e739e180e4f37cc
3
+ metadata.gz: 2c5c8ded4837eb0121ecd7fd62c01bec223b6db9fb50a1b3980498aa36d71bf8
4
+ data.tar.gz: 67b03ee8a3fd10cafea89cffe72612b68b7c8069a58adf7a6b33ce59263fdb00
5
5
  SHA512:
6
- metadata.gz: 5c2dac6db5f67e885d634c428b0dbe0eaeee6a3a74a5dffa64f267e8dd7f3666e7d129ac4dda66fc02d41503c5245cdd546e17d6bd88d217a80ecacbfcae11c3
7
- data.tar.gz: 1fdbb74b94544f25b3827638f0ffb853beb19e6e40bcbb1b4b31b547934c9266903fb9e7386e54a251dee2fecc629fb0c6b16cfcb1cdf44a678369ed67b0f32d
6
+ metadata.gz: d217082d10bcedd5aa63d8149cab66743037bf53e714d5400a7fe1315684e1490a81d5b9aac5dc7d181d66c04d800daf60e79504e64422d8b9ad47c489fb4c31
7
+ data.tar.gz: bd187aa095910349963d0046d0426527bb89a770104b54351f49933a90a95ad91f74c965d8b48f63f2faf43c4d2d248f1f61dd07b20cb099c2f19250476fbb2e
data/.rubocop.yml CHANGED
@@ -5,6 +5,7 @@ require:
5
5
  - rubocop-performance
6
6
 
7
7
  AllCops:
8
+ TargetRubyVersion: 2.6
8
9
  Exclude:
9
10
  - gemfiles/**/*
10
11
 
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.9
1
+ 2.7.6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## v6.4.3
2
+ - Force Rack > 2.2.3 to resolve [CVE-2022-30123](https://github.com/advisories/GHSA-wq4h-7r42-5hrr).
3
+
4
+ ## v6.4.2
5
+ - Add MAuth::ServerHelper module with convenience methods for servers to access requester app uuid.
6
+
1
7
  ## v6.4.1
2
8
  - Fix MAuth::Rack::Response to not raise FrozenError.
3
9
 
@@ -1,27 +1,27 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- mauth-client (6.4.0)
4
+ mauth-client (6.4.3)
5
5
  addressable (~> 2.0)
6
6
  coderay (~> 1.0)
7
7
  dice_bag (>= 0.9, < 2.0)
8
8
  faraday (>= 0.9, < 3.0)
9
9
  faraday-http-cache (>= 2.0, < 3.0)
10
- rack
10
+ rack (> 2.2.3)
11
11
  term-ansicolor (~> 1.0)
12
12
 
13
13
  GEM
14
14
  remote: https://rubygems.org/
15
15
  specs:
16
- addressable (2.8.0)
17
- public_suffix (>= 2.0.2, < 5.0)
16
+ addressable (2.8.1)
17
+ public_suffix (>= 2.0.2, < 6.0)
18
18
  coderay (1.1.3)
19
19
  dice_bag (1.6.1)
20
20
  diff-lcs (~> 1.0)
21
21
  rake
22
22
  thor (< 2.0)
23
23
  diff-lcs (1.5.0)
24
- faraday (1.9.3)
24
+ faraday (1.10.2)
25
25
  faraday-em_http (~> 1.0)
26
26
  faraday-em_synchrony (~> 1.0)
27
27
  faraday-excon (~> 1.1)
@@ -36,26 +36,26 @@ GEM
36
36
  faraday-em_http (1.0.0)
37
37
  faraday-em_synchrony (1.0.0)
38
38
  faraday-excon (1.1.0)
39
- faraday-http-cache (2.2.0)
39
+ faraday-http-cache (2.4.1)
40
40
  faraday (>= 0.8)
41
41
  faraday-httpclient (1.0.1)
42
- faraday-multipart (1.0.3)
43
- multipart-post (>= 1.2, < 3)
42
+ faraday-multipart (1.0.4)
43
+ multipart-post (~> 2)
44
44
  faraday-net_http (1.0.1)
45
45
  faraday-net_http_persistent (1.2.0)
46
46
  faraday-patron (1.0.0)
47
47
  faraday-rack (1.0.0)
48
48
  faraday-retry (1.0.3)
49
- multipart-post (2.1.1)
50
- public_suffix (4.0.6)
51
- rack (2.2.3)
49
+ multipart-post (2.2.3)
50
+ public_suffix (5.0.0)
51
+ rack (3.0.0)
52
52
  rake (13.0.6)
53
53
  ruby2_keywords (0.0.5)
54
54
  sync (0.5.0)
55
55
  term-ansicolor (1.7.1)
56
56
  tins (~> 1.0)
57
57
  thor (1.2.1)
58
- tins (1.31.0)
58
+ tins (1.31.1)
59
59
  sync
60
60
 
61
61
  PLATFORMS
data/lib/mauth/client.rb CHANGED
@@ -29,6 +29,7 @@ module MAuth
29
29
  MWS_TOKEN = 'MWS'
30
30
  MWSV2_TOKEN = 'MWSV2'
31
31
  AUTH_HEADER_DELIMITER = ';'
32
+ RACK_ENV_APP_UUID_KEY = 'mauth.app_uuid'
32
33
 
33
34
  include AuthenticatorBase
34
35
  include Signer
@@ -31,7 +31,7 @@ module MAuth
31
31
  env['mauth.protocol_version'] = mauth_request.protocol_version
32
32
 
33
33
  if self.class.is_authentic?
34
- @app.call(env.merge!('mauth.app_uuid' => mauth_request.signature_app_uuid,
34
+ @app.call(env.merge!(MAuth::Client::RACK_ENV_APP_UUID_KEY => mauth_request.signature_app_uuid,
35
35
  'mauth.authentic' => true))
36
36
  else
37
37
  response_for_inauthentic_request(env)
data/lib/mauth/faraday.rb CHANGED
@@ -22,7 +22,7 @@ module MAuth
22
22
  @app.call(request_env).on_complete do |response_env|
23
23
  mauth_response = MAuth::Faraday::Response.new(response_env)
24
24
  mauth_client.authenticate!(mauth_response) # raises MAuth::InauthenticError when inauthentic
25
- response_env['mauth.app_uuid'] = mauth_response.signature_app_uuid
25
+ response_env[MAuth::Client::RACK_ENV_APP_UUID_KEY] = mauth_response.signature_app_uuid
26
26
  response_env['mauth.authentic'] = true
27
27
  response_env
28
28
  end
data/lib/mauth/rack.rb CHANGED
@@ -29,7 +29,7 @@ module MAuth
29
29
  begin
30
30
  if mauth_client.authentic?(mauth_request)
31
31
  @app.call(env.merge!(
32
- 'mauth.app_uuid' => mauth_request.signature_app_uuid,
32
+ MAuth::Client::RACK_ENV_APP_UUID_KEY => mauth_request.signature_app_uuid,
33
33
  'mauth.authentic' => true
34
34
  ))
35
35
  else
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MAuth
4
+ module ServerHelper
5
+ def app_uuid(request)
6
+ request.env[MAuth::Client::RACK_ENV_APP_UUID_KEY]
7
+ end
8
+
9
+ def app_uuid_from_env(env)
10
+ env[MAuth::Client::RACK_ENV_APP_UUID_KEY]
11
+ end
12
+ end
13
+ end
data/lib/mauth/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MAuth
4
- VERSION = '6.4.1'
4
+ VERSION = '6.4.3'
5
5
  end
data/mauth-client.gemspec CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.add_dependency 'dice_bag', '>= 0.9', '< 2.0'
27
27
  spec.add_dependency 'faraday', '>= 0.9', '< 3.0'
28
28
  spec.add_dependency 'faraday-http-cache', '>= 2.0', '< 3.0'
29
- spec.add_dependency 'rack'
29
+ spec.add_dependency 'rack', '> 2.2.3'
30
30
  spec.add_dependency 'term-ansicolor', '~> 1.0'
31
31
 
32
32
  spec.add_development_dependency 'appraisal'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mauth-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.4.1
4
+ version: 6.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Szenher
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2022-02-28 00:00:00.000000000 Z
14
+ date: 2022-10-07 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: addressable
@@ -105,16 +105,16 @@ dependencies:
105
105
  name: rack
106
106
  requirement: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - ">"
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: 2.2.3
111
111
  type: :runtime
112
112
  prerelease: false
113
113
  version_requirements: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - ">"
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: 2.2.3
118
118
  - !ruby/object:Gem::Dependency
119
119
  name: term-ansicolor
120
120
  requirement: !ruby/object:Gem::Requirement
@@ -372,6 +372,7 @@ files:
372
372
  - lib/mauth/proxy.rb
373
373
  - lib/mauth/rack.rb
374
374
  - lib/mauth/request_and_response.rb
375
+ - lib/mauth/server_helper.rb
375
376
  - lib/mauth/version.rb
376
377
  - lib/rack/mauth.rb
377
378
  - mauth-client.gemspec
@@ -394,7 +395,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
394
395
  - !ruby/object:Gem::Version
395
396
  version: '0'
396
397
  requirements: []
397
- rubygems_version: 3.1.2
398
+ rubygems_version: 3.1.6
398
399
  signing_key:
399
400
  specification_version: 4
400
401
  summary: Sign and authenticate requests and responses with mAuth authentication.