mastercard_oauth1_signer 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/oauth.rb +6 -6
- data/oauth1_signer_ruby.gemspec +7 -4
- metadata +35 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e66edf3b0c03d25a2eeec6d3b3672539c9fb7c83d1c53027b503beb188011ce5
|
4
|
+
data.tar.gz: 30c885f68af13a3664ef2ca24e3f68106f9d44787a99c61b815a9012d305b91f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfafbf1ba178b3dfcb1b34036b2ae4f76fac07d7ab6bf99e45e4c6dfa983ed0374ed8678e9d95f64a2c864758b85347052ec6f3f351ca8a561f19277aa217769
|
7
|
+
data.tar.gz: 33be101c0648a58d6d99cb03e9e9095da355f0542aab98ce9be29311c4a20858e62fd1ab143e8c53e4fbcc1de7b3e757b3178302dd408de64f928398a69ee58a
|
data/lib/oauth.rb
CHANGED
@@ -75,9 +75,7 @@ class OAuth
|
|
75
75
|
def get_oauth_params(consumer_key, payload = nil)
|
76
76
|
oauth_params = {}
|
77
77
|
|
78
|
-
|
79
|
-
oauth_params['oauth_body_hash'] = get_body_hash(payload)
|
80
|
-
end
|
78
|
+
oauth_params['oauth_body_hash'] = get_body_hash(payload)
|
81
79
|
oauth_params['oauth_consumer_key'] = consumer_key
|
82
80
|
oauth_params['oauth_nonce'] = get_nonce
|
83
81
|
oauth_params['oauth_signature_method'] = "RSA-SHA#{SHA_BITS}"
|
@@ -114,8 +112,11 @@ class OAuth
|
|
114
112
|
def get_base_uri_string(uri)
|
115
113
|
url = URI.parse(uri)
|
116
114
|
# Lowercase scheme and authority
|
117
|
-
# Remove query and fragment
|
118
|
-
"#{url.scheme.downcase}://#{url.host.downcase}
|
115
|
+
# Remove redundant port, query, and fragment
|
116
|
+
base_uri = "#{url.scheme.downcase}://#{url.host.downcase}"
|
117
|
+
base_uri += ":#{url.port}" if url.scheme.downcase == "https" and url.port != 443
|
118
|
+
base_uri += ":#{url.port}" if url.scheme.downcase == "http" and url.port != 80
|
119
|
+
base_uri += "/#{url.path[1..-1]}"
|
119
120
|
end
|
120
121
|
|
121
122
|
#
|
@@ -126,7 +127,6 @@ class OAuth
|
|
126
127
|
# @param {Map<String, String>} oauthParamsMap Map of OAuth parameters to be included in Authorization header
|
127
128
|
# @return {String} Correctly encoded and sorted OAuth parameter string
|
128
129
|
#
|
129
|
-
|
130
130
|
def to_oauth_param_string(query_params_map, oauth_param_map)
|
131
131
|
consolidated_params = {}.merge(query_params_map)
|
132
132
|
|
data/oauth1_signer_ruby.gemspec
CHANGED
@@ -1,15 +1,18 @@
|
|
1
1
|
Gem::Specification.new do |gem|
|
2
2
|
gem.name = "mastercard_oauth1_signer"
|
3
3
|
gem.authors = ["Mastercard"]
|
4
|
-
gem.summary = %q{
|
4
|
+
gem.summary = %q{Mastercard client authentication library}
|
5
5
|
gem.description = %q{Zero dependency library for generating a Mastercard API compliant OAuth signature}
|
6
|
-
gem.version = "1.1.
|
6
|
+
gem.version = "1.1.1"
|
7
7
|
gem.license = "MIT"
|
8
8
|
gem.homepage = "https://github.com/Mastercard/oauth1-signer-ruby"
|
9
9
|
gem.files = Dir["{bin,spec,lib}/**/*"]+ Dir["data/*"] + ["oauth1_signer_ruby.gemspec"]
|
10
10
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
11
11
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
12
12
|
gem.require_paths = ["lib"]
|
13
|
-
|
14
|
-
gem.add_development_dependency
|
13
|
+
|
14
|
+
gem.add_development_dependency 'bundler', '>= 1.5'
|
15
|
+
gem.add_development_dependency 'minitest', '~> 5.0'
|
16
|
+
gem.add_development_dependency 'rake', ">= 12.3.3"
|
17
|
+
gem.add_development_dependency 'simplecov', '~> 0.16.1'
|
15
18
|
end
|
metadata
CHANGED
@@ -1,43 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mastercard_oauth1_signer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mastercard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.5'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.5'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: minitest
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '5.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '5.0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 12.3.3
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 12.3.3
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: simplecov
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
30
58
|
requirements:
|
31
59
|
- - "~>"
|
32
60
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
61
|
+
version: 0.16.1
|
34
62
|
type: :development
|
35
63
|
prerelease: false
|
36
64
|
version_requirements: !ruby/object:Gem::Requirement
|
37
65
|
requirements:
|
38
66
|
- - "~>"
|
39
67
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
68
|
+
version: 0.16.1
|
41
69
|
description: Zero dependency library for generating a Mastercard API compliant OAuth
|
42
70
|
signature
|
43
71
|
email:
|
@@ -70,5 +98,5 @@ rubyforge_project:
|
|
70
98
|
rubygems_version: 2.7.7
|
71
99
|
signing_key:
|
72
100
|
specification_version: 4
|
73
|
-
summary:
|
101
|
+
summary: Mastercard client authentication library
|
74
102
|
test_files: []
|