oauth 0.5.6 → 1.1.7

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.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/CHANGELOG.md +915 -0
  4. data/CITATION.cff +20 -0
  5. data/CODE_OF_CONDUCT.md +134 -0
  6. data/CONTRIBUTING.md +272 -0
  7. data/FUNDING.md +74 -0
  8. data/LICENSE.md +71 -0
  9. data/README.md +718 -0
  10. data/RUBOCOP.md +71 -0
  11. data/SECURITY.md +21 -0
  12. data/certs/pboling.pem +27 -0
  13. data/lib/oauth/auth_sanitizer.rb +36 -0
  14. data/lib/oauth/client/action_controller_request.rb +33 -22
  15. data/lib/oauth/client/em_http.rb +110 -103
  16. data/lib/oauth/client/helper.rb +87 -82
  17. data/lib/oauth/client/net_http.rb +140 -107
  18. data/lib/oauth/client.rb +2 -0
  19. data/lib/oauth/consumer.rb +282 -149
  20. data/lib/oauth/errors/error.rb +2 -0
  21. data/lib/oauth/errors/problem.rb +4 -1
  22. data/lib/oauth/errors/unauthorized.rb +7 -1
  23. data/lib/oauth/errors.rb +5 -3
  24. data/lib/oauth/helper.rb +48 -18
  25. data/lib/oauth/oauth.rb +31 -7
  26. data/lib/oauth/oauth_test_helper.rb +6 -4
  27. data/lib/oauth/optional.rb +20 -0
  28. data/lib/oauth/request_proxy/action_controller_request.rb +53 -71
  29. data/lib/oauth/request_proxy/action_dispatch_request.rb +42 -4
  30. data/lib/oauth/request_proxy/base.rb +146 -131
  31. data/lib/oauth/request_proxy/curb_request.rb +49 -43
  32. data/lib/oauth/request_proxy/em_http_request.rb +60 -49
  33. data/lib/oauth/request_proxy/jabber_request.rb +19 -9
  34. data/lib/oauth/request_proxy/mock_request.rb +5 -3
  35. data/lib/oauth/request_proxy/net_http.rb +61 -54
  36. data/lib/oauth/request_proxy/rack_request.rb +31 -31
  37. data/lib/oauth/request_proxy/rest_client_request.rb +55 -50
  38. data/lib/oauth/request_proxy/typhoeus_request.rb +51 -45
  39. data/lib/oauth/request_proxy.rb +21 -14
  40. data/lib/oauth/server.rb +18 -12
  41. data/lib/oauth/signature/base.rb +88 -71
  42. data/lib/oauth/signature/hmac/sha1.rb +16 -10
  43. data/lib/oauth/signature/hmac/sha256.rb +16 -10
  44. data/lib/oauth/signature/plaintext.rb +18 -20
  45. data/lib/oauth/signature/rsa/sha1.rb +71 -38
  46. data/lib/oauth/signature.rb +41 -34
  47. data/lib/oauth/token.rb +7 -5
  48. data/lib/oauth/tokens/access_token.rb +6 -4
  49. data/lib/oauth/tokens/consumer_token.rb +11 -7
  50. data/lib/oauth/tokens/request_token.rb +17 -10
  51. data/lib/oauth/tokens/server_token.rb +2 -1
  52. data/lib/oauth/tokens/token.rb +15 -1
  53. data/lib/oauth/version.rb +6 -1
  54. data/lib/oauth.rb +19 -9
  55. data/sig/oauth/consumer.rbs +9 -0
  56. data/sig/oauth/signature/base.rbs +12 -0
  57. data/sig/oauth/tokens/token.rbs +8 -0
  58. data/sig/oauth/version.rbs +6 -0
  59. data.tar.gz.sig +2 -0
  60. metadata +313 -84
  61. metadata.gz.sig +3 -0
  62. data/LICENSE +0 -20
  63. data/README.rdoc +0 -88
  64. data/TODO +0 -32
  65. data/bin/oauth +0 -11
  66. data/lib/oauth/cli/authorize_command.rb +0 -71
  67. data/lib/oauth/cli/base_command.rb +0 -208
  68. data/lib/oauth/cli/help_command.rb +0 -22
  69. data/lib/oauth/cli/query_command.rb +0 -25
  70. data/lib/oauth/cli/sign_command.rb +0 -81
  71. data/lib/oauth/cli/version_command.rb +0 -7
  72. data/lib/oauth/cli.rb +0 -56
@@ -1,101 +1,106 @@
1
- require 'oauth/client'
2
- require 'oauth/consumer'
3
- require 'oauth/helper'
4
- require 'oauth/token'
5
- require 'oauth/signature/hmac/sha1'
6
-
7
- module OAuth::Client
8
- class Helper
9
- include OAuth::Helper
10
-
11
- def initialize(request, options = {})
12
- @request = request
13
- @options = options
14
- @options[:signature_method] ||= 'HMAC-SHA1'
15
- end
1
+ # frozen_string_literal: true
2
+
3
+ require "oauth/client"
4
+ require "oauth/consumer"
5
+ require "oauth/helper"
6
+ require "oauth/token"
7
+ require "oauth/signature/hmac/sha1"
8
+
9
+ module OAuth
10
+ module Client
11
+ class Helper
12
+ include OAuth::Helper
13
+
14
+ def initialize(request, options = {})
15
+ @request = request
16
+ @options = options
17
+ @options[:signature_method] ||= "HMAC-SHA1"
18
+ end
16
19
 
17
- def options
18
- @options
19
- end
20
+ attr_reader :options
20
21
 
21
- def nonce
22
- options[:nonce] ||= generate_key
23
- end
22
+ def nonce
23
+ options[:nonce] ||= generate_key
24
+ end
24
25
 
25
- def timestamp
26
- options[:timestamp] ||= generate_timestamp
27
- end
26
+ def timestamp
27
+ options[:timestamp] ||= generate_timestamp
28
+ end
28
29
 
29
- def oauth_parameters
30
- out = {
31
- 'oauth_body_hash' => options[:body_hash],
32
- 'oauth_callback' => options[:oauth_callback],
33
- 'oauth_consumer_key' => options[:consumer].key,
34
- 'oauth_token' => options[:token] ? options[:token].token : '',
35
- 'oauth_signature_method' => options[:signature_method],
36
- 'oauth_timestamp' => timestamp,
37
- 'oauth_nonce' => nonce,
38
- 'oauth_verifier' => options[:oauth_verifier],
39
- 'oauth_version' => (options[:oauth_version] || '1.0'),
40
- 'oauth_session_handle' => options[:oauth_session_handle]
41
- }
42
- allowed_empty_params = options[:allow_empty_params]
43
- if allowed_empty_params != true && !allowed_empty_params.kind_of?(Array)
44
- allowed_empty_params = allowed_empty_params == false ? [] : [allowed_empty_params]
30
+ def oauth_parameters
31
+ out = {
32
+ "oauth_body_hash" => options[:body_hash],
33
+ "oauth_callback" => options[:oauth_callback],
34
+ "oauth_consumer_key" => options[:consumer].key,
35
+ "oauth_token" => options[:token] ? options[:token].token : "",
36
+ "oauth_signature_method" => options[:signature_method],
37
+ "oauth_timestamp" => timestamp,
38
+ "oauth_nonce" => nonce,
39
+ "oauth_verifier" => options[:oauth_verifier],
40
+ "oauth_version" => options[:oauth_version] || "1.0",
41
+ "oauth_session_handle" => options[:oauth_session_handle],
42
+ }
43
+ allowed_empty_params = options[:allow_empty_params]
44
+ if allowed_empty_params != true && !allowed_empty_params.is_a?(Array)
45
+ allowed_empty_params = (allowed_empty_params == false) ? [] : [allowed_empty_params]
46
+ end
47
+ out.select! { |k, v| v.to_s != "" || allowed_empty_params == true || allowed_empty_params.include?(k) }
48
+ out
45
49
  end
46
- out.select! { |k,v| v.to_s != '' || allowed_empty_params == true || allowed_empty_params.include?(k) }
47
- out
48
- end
49
50
 
50
- def signature(extra_options = {})
51
- OAuth::Signature.sign(@request, { :uri => options[:request_uri],
52
- :consumer => options[:consumer],
53
- :token => options[:token],
54
- :unsigned_parameters => options[:unsigned_parameters]
55
- }.merge(extra_options) )
56
- end
51
+ def signature(extra_options = {})
52
+ OAuth::Signature.sign(@request, {
53
+ uri: options[:request_uri],
54
+ consumer: options[:consumer],
55
+ token: options[:token],
56
+ unsigned_parameters: options[:unsigned_parameters],
57
+ }.merge(extra_options))
58
+ end
57
59
 
58
- def signature_base_string(extra_options = {})
59
- OAuth::Signature.signature_base_string(@request, { :uri => options[:request_uri],
60
- :consumer => options[:consumer],
61
- :token => options[:token],
62
- :parameters => oauth_parameters}.merge(extra_options) )
63
- end
60
+ def signature_base_string(extra_options = {})
61
+ OAuth::Signature.signature_base_string(@request, {
62
+ uri: options[:request_uri],
63
+ consumer: options[:consumer],
64
+ token: options[:token],
65
+ parameters: oauth_parameters,
66
+ }.merge(extra_options))
67
+ end
64
68
 
65
- def token_request?
66
- @options[:token_request].eql?(true)
67
- end
69
+ def token_request?
70
+ @options[:token_request].eql?(true)
71
+ end
68
72
 
69
- def hash_body
70
- @options[:body_hash] = OAuth::Signature.body_hash(@request, :parameters => oauth_parameters)
71
- end
73
+ def hash_body
74
+ @options[:body_hash] = OAuth::Signature.body_hash(@request, parameters: oauth_parameters)
75
+ end
72
76
 
73
- def amend_user_agent_header(headers)
74
- @oauth_ua_string ||= "OAuth gem v#{OAuth::VERSION}"
75
- # Net::HTTP in 1.9 appends Ruby
76
- if headers['User-Agent'] && headers['User-Agent'] != 'Ruby'
77
- headers['User-Agent'] += " (#{@oauth_ua_string})"
78
- else
79
- headers['User-Agent'] = @oauth_ua_string
77
+ def amend_user_agent_header(headers)
78
+ @oauth_ua_string ||= "OAuth gem v#{OAuth::Version::VERSION}"
79
+ # Net::HTTP in 1.9 appends Ruby
80
+ if headers["User-Agent"] && headers["User-Agent"] != "Ruby"
81
+ headers["User-Agent"] += " (#{@oauth_ua_string})"
82
+ else
83
+ headers["User-Agent"] = @oauth_ua_string
84
+ end
80
85
  end
81
- end
82
86
 
83
- def header
84
- parameters = oauth_parameters
85
- parameters.merge!('oauth_signature' => signature(options.merge(:parameters => parameters)))
87
+ def header
88
+ parameters = oauth_parameters
89
+ parameters["oauth_signature"] = signature(options.merge(parameters: parameters))
86
90
 
87
- header_params_str = parameters.sort.map { |k,v| "#{k}=\"#{escape(v)}\"" }.join(', ')
91
+ header_params_str = parameters.sort.map { |k, v| "#{k}=\"#{escape(v)}\"" }.join(", ")
88
92
 
89
- realm = "realm=\"#{options[:realm]}\", " if options[:realm]
90
- "OAuth #{realm}#{header_params_str}"
91
- end
93
+ realm = "realm=\"#{options[:realm]}\", " if options[:realm]
94
+ "OAuth #{realm}#{header_params_str}"
95
+ end
92
96
 
93
- def parameters
94
- OAuth::RequestProxy.proxy(@request).parameters
95
- end
97
+ def parameters
98
+ OAuth::RequestProxy.proxy(@request).parameters
99
+ end
96
100
 
97
- def parameters_with_oauth
98
- oauth_parameters.merge(parameters)
101
+ def parameters_with_oauth
102
+ oauth_parameters.merge(parameters)
103
+ end
99
104
  end
100
105
  end
101
106
  end
@@ -1,121 +1,154 @@
1
- require 'oauth/helper'
2
- require 'oauth/request_proxy/net_http'
3
-
4
- class Net::HTTPGenericRequest
5
- include OAuth::Helper
6
-
7
- attr_reader :oauth_helper
8
-
9
- # Add the OAuth information to an HTTP request. Depending on the <tt>options[:scheme]</tt> setting
10
- # this may add a header, additional query string parameters, or additional POST body parameters.
11
- # The default scheme is +header+, in which the OAuth parameters as put into the +Authorization+
12
- # header.
13
- #
14
- # * http - Configured Net::HTTP instance
15
- # * consumer - OAuth::Consumer instance
16
- # * token - OAuth::Token instance
17
- # * options - Request-specific options (e.g. +request_uri+, +consumer+, +token+, +scheme+,
18
- # +signature_method+, +nonce+, +timestamp+)
19
- #
20
- # This method also modifies the <tt>User-Agent</tt> header to add the OAuth gem version.
21
- #
22
- # See Also: {OAuth core spec version 1.0, section 5.4.1}[http://oauth.net/core/1.0#rfc.section.5.4.1],
23
- # {OAuth Request Body Hash 1.0 Draft 4}[http://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/drafts/4/spec.html,
24
- # http://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/oauth-bodyhash.html#when_to_include]
25
- def oauth!(http, consumer = nil, token = nil, options = {})
26
- helper_options = oauth_helper_options(http, consumer, token, options)
27
- @oauth_helper = OAuth::Client::Helper.new(self, helper_options)
28
- @oauth_helper.amend_user_agent_header(self)
29
- @oauth_helper.hash_body if oauth_body_hash_required?
30
- self.send("set_oauth_#{helper_options[:scheme]}")
31
- end
32
-
33
- # Create a string suitable for signing for an HTTP request. This process involves parameter
34
- # normalization as specified in the OAuth specification. The exact normalization also depends
35
- # on the <tt>options[:scheme]</tt> being used so this must match what will be used for the request
36
- # itself. The default scheme is +header+, in which the OAuth parameters as put into the +Authorization+
37
- # header.
38
- #
39
- # * http - Configured Net::HTTP instance
40
- # * consumer - OAuth::Consumer instance
41
- # * token - OAuth::Token instance
42
- # * options - Request-specific options (e.g. +request_uri+, +consumer+, +token+, +scheme+,
43
- # +signature_method+, +nonce+, +timestamp+)
44
- #
45
- # See Also: {OAuth core spec version 1.0, section 5.4.1}[http://oauth.net/core/1.0#rfc.section.5.4.1],
46
- # {OAuth Request Body Hash 1.0 Draft 4}[http://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/drafts/4/spec.html,
47
- # http://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/oauth-bodyhash.html#when_to_include]
48
- def signature_base_string(http, consumer = nil, token = nil, options = {})
49
- helper_options = oauth_helper_options(http, consumer, token, options)
50
- @oauth_helper = OAuth::Client::Helper.new(self, helper_options)
51
- @oauth_helper.hash_body if oauth_body_hash_required?
52
- @oauth_helper.signature_base_string
53
- end
54
-
55
- private
1
+ # frozen_string_literal: true
2
+
3
+ require "oauth/helper"
4
+ require "oauth/request_proxy/net_http"
5
+
6
+ module Net
7
+ class HTTPGenericRequest
8
+ include OAuth::Helper
9
+
10
+ attr_reader :oauth_helper
11
+
12
+ # Add the OAuth information to an HTTP request. Depending on the <tt>options[:scheme]</tt> setting
13
+ # this may add a header, additional query string parameters, or additional POST body parameters.
14
+ # The default scheme is +header+, in which the OAuth parameters as put into the +Authorization+
15
+ # header.
16
+ #
17
+ # * http - Configured Net::HTTP instance
18
+ # * consumer - OAuth::Consumer instance
19
+ # * token - OAuth::Token instance
20
+ # * options - Request-specific options (e.g. +request_uri+, +consumer+, +token+, +scheme+,
21
+ # +signature_method+, +nonce+, +timestamp+, +body_hash+)
22
+ #
23
+ # This method also modifies the <tt>User-Agent</tt> header to add the OAuth gem version.
24
+ #
25
+ # See Also: {OAuth core spec version 1.0, section 5.4.1}[http://oauth.net/core/1.0#rfc.section.5.4.1],
26
+ # {OAuth Request Body Hash 1.0 Draft 4}[http://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/drafts/4/spec.html,
27
+ # http://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/oauth-bodyhash.html#when_to_include]
28
+ def oauth!(http, consumer = nil, token = nil, options = {})
29
+ helper_options = oauth_helper_options(http, consumer, token, options)
30
+ @oauth_helper = OAuth::Client::Helper.new(self, helper_options)
31
+ @oauth_helper.amend_user_agent_header(self)
32
+ @oauth_helper.hash_body if oauth_body_hash_required?(helper_options)
33
+ send("set_oauth_#{helper_options[:scheme]}")
34
+ end
56
35
 
57
- def oauth_helper_options(http, consumer, token, options)
58
- { :request_uri => oauth_full_request_uri(http,options),
59
- :consumer => consumer,
60
- :token => token,
61
- :scheme => 'header',
62
- :signature_method => nil,
63
- :nonce => nil,
64
- :timestamp => nil }.merge(options)
65
- end
36
+ # Create a string suitable for signing for an HTTP request. This process involves parameter
37
+ # normalization as specified in the OAuth specification. The exact normalization also depends
38
+ # on the <tt>options[:scheme]</tt> being used so this must match what will be used for the request
39
+ # itself. The default scheme is +header+, in which the OAuth parameters as put into the +Authorization+
40
+ # header.
41
+ #
42
+ # * http - Configured Net::HTTP instance
43
+ # * consumer - OAuth::Consumer instance
44
+ # * token - OAuth::Token instance
45
+ # * options - Request-specific options (e.g. +request_uri+, +consumer+, +token+, +scheme+,
46
+ # +signature_method+, +nonce+, +timestamp+)
47
+ #
48
+ # See Also: {OAuth core spec version 1.0, section 5.4.1}[http://oauth.net/core/1.0#rfc.section.5.4.1],
49
+ # {OAuth Request Body Hash 1.0 Draft 4}[http://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/drafts/4/spec.html,
50
+ # http://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/oauth-bodyhash.html#when_to_include]
51
+ def signature_base_string(http, consumer = nil, token = nil, options = {})
52
+ helper_options = oauth_helper_options(http, consumer, token, options)
53
+ @oauth_helper = OAuth::Client::Helper.new(self, helper_options)
54
+ @oauth_helper.hash_body if oauth_body_hash_required?(helper_options)
55
+ @oauth_helper.signature_base_string
56
+ end
66
57
 
67
- def oauth_full_request_uri(http,options)
68
- uri = URI.parse(self.path)
69
- uri.host = http.address
70
- uri.port = http.port
58
+ private
59
+
60
+ def oauth_helper_options(http, consumer, token, options)
61
+ {
62
+ request_uri: oauth_full_request_uri(http, options),
63
+ consumer: consumer,
64
+ token: token,
65
+ scheme: "header",
66
+ signature_method: nil,
67
+ nonce: nil,
68
+ timestamp: nil,
69
+ body_hash_enabled: true,
70
+ }.merge(options)
71
+ end
71
72
 
72
- if options[:request_endpoint] && options[:site]
73
- is_https = options[:site].match(%r(^https://))
74
- uri.host = options[:site].gsub(%r(^https?://), '')
75
- uri.port ||= is_https ? 443 : 80
73
+ def oauth_full_request_uri(http, options)
74
+ uri = URI.parse(path)
75
+
76
+ # Guard against strict doubles or alternative HTTP adapters that may not
77
+ # expose Net::HTTP's #address/#port API. Only set host/port when available;
78
+ # otherwise, leave them to be filled by other options (e.g., :site) or the
79
+ # request itself.
80
+ if http.respond_to?(:address)
81
+ uri.host ||= http.address
82
+ end
83
+ if http.respond_to?(:port)
84
+ uri.port ||= http.port
85
+ end
86
+
87
+ if options[:request_endpoint] && options[:site]
88
+ is_https = options[:site].match(%r{^https://})
89
+ uri.host = options[:site].gsub(%r{^https?://}, "")
90
+ uri.port ||= is_https ? 443 : 80
91
+ end
92
+
93
+ # Fall back to the provided site URL if host/scheme are still missing.
94
+ if options[:site]
95
+ begin
96
+ site_uri = URI.parse(options[:site])
97
+ uri.host ||= site_uri.host
98
+ uri.scheme ||= site_uri.scheme
99
+ uri.port ||= site_uri.port
100
+ rescue URI::InvalidURIError
101
+ # ignore and use defaults below
102
+ end
103
+ end
104
+
105
+ # As a last resort, ensure scheme/host/port are present to avoid nil errors
106
+ uri.scheme ||= if http.respond_to?(:use_ssl?) && http.use_ssl?
107
+ "https"
108
+ else
109
+ "http"
110
+ end
111
+ uri.host ||= "localhost"
112
+ uri.port ||= ((uri.scheme == "https") ? 443 : 80)
113
+
114
+ uri.to_s
76
115
  end
77
116
 
78
- if http.respond_to?(:use_ssl?) && http.use_ssl?
79
- uri.scheme = "https"
80
- else
81
- uri.scheme = "http"
117
+ def oauth_body_hash_required?(options)
118
+ !@oauth_helper.token_request? && request_body_permitted? && !content_type.to_s.downcase.start_with?("application/x-www-form-urlencoded") && options[:body_hash_enabled]
82
119
  end
83
120
 
84
- uri.to_s
85
- end
121
+ def set_oauth_header
122
+ self["Authorization"] = @oauth_helper.header
123
+ end
86
124
 
87
- def oauth_body_hash_required?
88
- !@oauth_helper.token_request? && request_body_permitted? && !content_type.to_s.downcase.start_with?("application/x-www-form-urlencoded")
89
- end
125
+ # FIXME: if you're using a POST body and query string parameters, this method
126
+ # will move query string parameters into the body unexpectedly. This may
127
+ # cause problems with non-x-www-form-urlencoded bodies submitted to URLs
128
+ # containing query string params. If duplicate parameters are present in both
129
+ # places, all instances should be included when calculating the signature
130
+ # base string.
131
+
132
+ def set_oauth_body
133
+ # NOTE: OAuth::Helper and @oauth_helper are not the same, despite sharing all methods defined in OAuth::Helper
134
+ # see: https://stackoverflow.com/a/53447775/213191
135
+ set_form_data(OAuth::Helper.stringify_keys(@oauth_helper.parameters_with_oauth))
136
+ params_with_sig = @oauth_helper.parameters.merge(oauth_signature: @oauth_helper.signature)
137
+ set_form_data(OAuth::Helper.stringify_keys(params_with_sig))
138
+ end
90
139
 
91
- def set_oauth_header
92
- self['Authorization'] = @oauth_helper.header
93
- end
140
+ def set_oauth_query_string
141
+ oauth_params_str = @oauth_helper.oauth_parameters.map { |k, v| [escape(k), escape(v)].join("=") }.join("&")
142
+ uri = URI.parse(path)
143
+ uri.query = if uri.query.to_s == ""
144
+ oauth_params_str
145
+ else
146
+ "#{uri.query}&#{oauth_params_str}"
147
+ end
94
148
 
95
- # FIXME: if you're using a POST body and query string parameters, this method
96
- # will move query string parameters into the body unexpectedly. This may
97
- # cause problems with non-x-www-form-urlencoded bodies submitted to URLs
98
- # containing query string params. If duplicate parameters are present in both
99
- # places, all instances should be included when calculating the signature
100
- # base string.
101
-
102
- def set_oauth_body
103
- self.set_form_data(@oauth_helper.stringify_keys(@oauth_helper.parameters_with_oauth))
104
- params_with_sig = @oauth_helper.parameters.merge(:oauth_signature => @oauth_helper.signature)
105
- self.set_form_data(@oauth_helper.stringify_keys(params_with_sig))
106
- end
149
+ @path = uri.to_s
107
150
 
108
- def set_oauth_query_string
109
- oauth_params_str = @oauth_helper.oauth_parameters.map { |k,v| [escape(k), escape(v)] * "=" }.join("&")
110
- uri = URI.parse(path)
111
- if uri.query.to_s == ""
112
- uri.query = oauth_params_str
113
- else
114
- uri.query = uri.query + "&" + oauth_params_str
151
+ @path << "&oauth_signature=#{escape(oauth_helper.signature)}"
115
152
  end
116
-
117
- @path = uri.to_s
118
-
119
- @path << "&oauth_signature=#{escape(oauth_helper.signature)}"
120
153
  end
121
154
  end
data/lib/oauth/client.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module OAuth
2
4
  module Client
3
5
  end