mauth-client 5.0.0 → 5.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: fb397d4c368ae894af1012c2305891bdfe4c85269e75e54167d4a7482a034f5a
4
- data.tar.gz: 8dc255a280b8304360b305be500b00bf1a8205293a7061af866a99f2eb69ca10
3
+ metadata.gz: a0e68cfc0209b5a75353832da0b86ad09d62414a7d7b41064140f74015202b62
4
+ data.tar.gz: 9d7030753959fcb55da17f407d952d271bcb55ce17055b57c7639cab591968fe
5
5
  SHA512:
6
- metadata.gz: 8e519a163cba44ca112f31d91a2da679601cebeac172eac15704f0ff93cc3ea5a3eba6e654d15cce3cbd2c587cc5bc3e6ae88a1042b84bdaa77f3e71fda01a96
7
- data.tar.gz: 18e5b9888c5c56ffa2f78197cdca887958e220f6f63e71807393d043508b5cd013ded15031d29230262cdfeb0de86f1f71f18cffd62a64c5719da030a59915d8
6
+ metadata.gz: 7d9c6a695ada3e6ba84d8cf315618e502841b59f261a19caadb7ee3f83ff2744a4cd6621571fb8d9f1e6917c5894c002e77d6b90556696cc6124ebc58b47870b
7
+ data.tar.gz: d623c9f86481d9c159c49bf0222bdc06ea405bd3063763cdabfbd26d97014c3847854a2dcfd26a7100afd9cc3fcc8b79dd334dee0d89d96c45c4aa8ce1960826
@@ -1,3 +1,6 @@
1
+ ## v5.0.1
2
+ - Update euresource escaping of query string.
3
+
1
4
  ## v5.0.0
2
5
  - Add support for MWSV2 protocol.
3
6
  - Change request signing to sign with both V1 and V2 protocols by default.
@@ -86,7 +86,7 @@ module MAuth
86
86
  time: object.mcc_time,
87
87
  app_uuid: object.signature_app_uuid,
88
88
  request_url: euresource_escape(original_request_uri.to_s),
89
- query_string: euresource_escape(original_query_string.to_s)
89
+ query_string: euresource_query_escape(original_query_string.to_s)
90
90
  )
91
91
 
92
92
  pubkey = OpenSSL::PKey::RSA.new(retrieve_public_key(object.signature_app_uuid))
@@ -120,6 +120,14 @@ module MAuth
120
120
  CGI.escape(str).gsub(/%2F|%23/, '%2F' => '/', '%23' => '#')
121
121
  end
122
122
 
123
+ # Euresource encodes keys and values of query params but does not encode the '='
124
+ # that separates keys and values and the '&' that separate k/v pairs
125
+ # Euresource currently adds query parameters via the following method:
126
+ # https://www.rubydoc.info/gems/addressable/2.3.4/Addressable/URI#query_values=-instance_method
127
+ def euresource_query_escape(str)
128
+ CGI.escape(str).gsub(/%3D|%26/, '%3D' => '=', '%26' => '&')
129
+ end
130
+
123
131
  def retrieve_public_key(app_uuid)
124
132
  retrieve_security_token(app_uuid)['security_token']['public_key_str']
125
133
  end
@@ -1,3 +1,3 @@
1
1
  module MAuth
2
- VERSION = '5.0.0'.freeze
2
+ VERSION = '5.0.1'.freeze
3
3
  end
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: 5.0.0
4
+ version: 5.0.1
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: 2019-07-23 00:00:00.000000000 Z
14
+ date: 2019-08-07 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: faraday
@@ -290,7 +290,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
290
290
  - !ruby/object:Gem::Version
291
291
  version: '0'
292
292
  requirements: []
293
- rubygems_version: 3.0.4
293
+ rubyforge_project:
294
+ rubygems_version: 2.7.7
294
295
  signing_key:
295
296
  specification_version: 4
296
297
  summary: Sign and authenticate requests and responses with mAuth authentication.