signet 0.14.0 → 0.14.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: bc147432dec3ce0cfc7dcb2f935b0b7063e65d7831415f58b00a133834b60eac
4
- data.tar.gz: d3b11b9064d2bb95a4d905a8199a2372ea96a9214ba050cdc7a496108cc90094
3
+ metadata.gz: c94f4ee9a5ea982bba69826873be998a4cbf833af8c70920fd2384558efe33e5
4
+ data.tar.gz: 211e019a051159858a4e18cbe64efe9989a13df08b2d449e67ac4057f91f4332
5
5
  SHA512:
6
- metadata.gz: 13dd09c6860ee3607e0930ca51485f16b51137c62684288a834eb0b008dbcea7b5ee665320061561838f1d680920f15254cc8acc9d83ef80c6c8dcad72277950
7
- data.tar.gz: 3052287168b60094c7d87e9f51b7ad89bf57f72e78f188a0f0be60a4914a62a36d2dd3e18ff6d89524665695ac3126c85af330884fe83c9ccf022ad61df2be7b
6
+ metadata.gz: d8e5ac7a7977d89976275a4988e62139622436dea9f539a934b99e94f32832e57c8c522a91647449f9b5ea199fa561ad62680803f7d1dbe5b40946087b95dae4
7
+ data.tar.gz: 2b6476b3b89d09d66c0274fa9bd1b5da6aebb68932e7e15325cf34ccca14b5d5f5a16f76a22330bbcb9f6b66882e016eeccb54977e7a87cc4ce6f32568361808
@@ -1,54 +1,63 @@
1
- ### 0.14.0 / 2020-03-31
1
+ # Release History
2
+
3
+ ## [0.14.1](https://www.github.com/googleapis/signet/compare/v0.14.0...v0.14.1) (2021-01-27)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * Fix OAuth1 signature with duplicate query param names ([9f5b81a](https://www.github.com/googleapis/signet/commit/9f5b81a60625a6e6f0e5bca24c67b90e73d7479b))
9
+
10
+ ## 0.14.0 / 2020-03-31
2
11
 
3
12
  * Support for fetching ID tokens from google oauth2 endpoint.
4
13
 
5
- ### 0.13.2 / 2020-03-25
14
+ ## 0.13.2 / 2020-03-25
6
15
 
7
16
  Rerelease of 0.13.1.
8
17
 
9
- ### 0.13.1 / 2020-03-24
18
+ ## 0.13.1 / 2020-03-24
10
19
 
11
20
  * Update github url
12
21
 
13
- ### 0.13.0 / 2020-02-24
22
+ ## 0.13.0 / 2020-02-24
14
23
 
15
24
  * Support Faraday 1.x
16
25
 
17
- ### 0.12.0 / 2019-10-08
26
+ ## 0.12.0 / 2019-10-08
18
27
 
19
28
  * This version now requires Ruby 2.4.
20
29
  * Support array values of the "aud" field.
21
30
  * Normalize the version constant to match related gems.
22
31
 
23
- ### 0.11.0 / 2018-10-08
32
+ ## 0.11.0 / 2018-10-08
24
33
 
25
34
  * Add constant time comparison for oauth signatures.
26
35
 
27
- ### 0.10.0 / 2018-09-21
36
+ ## 0.10.0 / 2018-09-21
28
37
 
29
38
  * Add UnexpectedStatusError class for http status errors that are not handled.
30
39
 
31
- ### 0.9.2 / 2018-09-12
40
+ ## 0.9.2 / 2018-09-12
32
41
 
33
42
  * Update issued_at correctly when it is set simultaneously with expires_in.
34
43
 
35
- ### 0.9.1 / 2018-08-29
44
+ ## 0.9.1 / 2018-08-29
36
45
 
37
46
  * Warn on EOL ruby versions.
38
47
  * Fix DateTime normalization.
39
48
 
40
- ### 0.9.0 / 2018-08-20
49
+ ## 0.9.0 / 2018-08-20
41
50
 
42
51
  * Add RemoteServerError class for 5xx level errors.
43
52
  * Allow to_json to be called with arguments
44
53
  * Expires_in now sets and reflects current expires_at value
45
54
  * Expires_within(0) now returns false when expires_at is nil.
46
55
 
47
- ### 0.8.1 / 2017-10-13
56
+ ## 0.8.1 / 2017-10-13
48
57
 
49
58
  * Restore support for Ruby 1.9.3
50
59
 
51
- ### 0.8.0 / 2017-10-12
60
+ ## 0.8.0 / 2017-10-12
52
61
 
53
62
  * Ensure the "expires_at" attribute is recalculated on refresh (chutzimir)
54
63
  * Fix warnings on Ruby 2.4 (koic)
@@ -56,20 +65,20 @@ Rerelease of 0.13.1.
56
65
  * Provide signature verification algorithm for compatibility with ruby-jwt 2.0 (jurriaan)
57
66
  * Signet::OAuth2::Client#decoded_id_token can take a keyfinder block (mvastola)
58
67
 
59
- ### 0.7.3 / 2016-06-20
68
+ ## 0.7.3 / 2016-06-20
60
69
 
61
70
  * Fix timestamp parsing on 32-bit systems
62
71
  * Fix expiration check when issue/expiry times are nil
63
72
 
64
- ### 0.7.2 / 2015-12-21
73
+ ## 0.7.2 / 2015-12-21
65
74
 
66
75
  * Don't assume Faraday form encoding middleware is present
67
76
 
68
- ### 0.7.1 / 2015-12-17
77
+ ## 0.7.1 / 2015-12-17
69
78
 
70
79
  * Fix an issue with date parsing
71
80
 
72
- ### 0.7 / 2015-12-06
81
+ ## 0.7 / 2015-12-06
73
82
 
74
83
  * No longer overwrite SSL environment variables.
75
84
  * Tighten up date & URL (de)serialization for OAuth2 client
@@ -78,7 +87,7 @@ Rerelease of 0.13.1.
78
87
  * Add expires_within(sec) method to oauth2 client to facilitate proactive
79
88
  refreshes
80
89
 
81
- ### 0.6.1 / 2015-06-08
90
+ ## 0.6.1 / 2015-06-08
82
91
 
83
92
  * Fix language warnings for unused & shadowed variables ((@blowmage)[])
84
93
  * Update SSL cert path for OSX ((@gambaroff)[])
@@ -86,14 +95,14 @@ Rerelease of 0.13.1.
86
95
  * Fix incorrect parameter name in OAuth2 client docs ((@samuelreh)[])
87
96
  * Fix symbolization of URL parameter keys ((@swifthand)[])
88
97
 
89
- ### 0.6.0 / 2014-12-05
98
+ ## 0.6.0 / 2014-12-05
90
99
 
91
100
  * Drop support for ruby versions < 1.9.3
92
101
  * Update gem dependencies and lock down versions tighter
93
102
  * Allow form encoded responses when exchanging OAuth 2 authorization codes
94
103
  * Normalize options keys for indifferent access
95
104
 
96
- ### 0.5.1 / 2014-06-08
105
+ ## 0.5.1 / 2014-06-08
97
106
 
98
107
  * Allow Hash objects to be used to initialize authorization URI
99
108
  * Added PLAINTEXT and RSA-SHA1 signature methods to OAuth 1 support
@@ -101,53 +110,53 @@ Rerelease of 0.13.1.
101
110
  * The `approval_prompt` option no longer defaults to `:force`
102
111
  * The `approval_prompt` and `prompt` are now mutually exclusive.
103
112
 
104
- ### 0.5.0 / 2013-05-31
113
+ ## 0.5.0 / 2013-05-31
105
114
 
106
115
  * Switched to faraday 0.9.0
107
116
  * Added `expires_at` option
108
117
 
109
- ### 0.4.5
118
+ ## 0.4.5
110
119
 
111
120
  * Minor documentation fixes
112
121
  * Allow postmessage as a valid redirect_uri in OAuth 2
113
122
 
114
- ### 0.4.4
123
+ ## 0.4.4
115
124
 
116
125
  * Add support for assertion profile
117
126
 
118
- ### 0.4.3
127
+ ## 0.4.3
119
128
 
120
129
  * Added method to clear credentials
121
130
 
122
- ### 0.4.2
131
+ ## 0.4.2
123
132
 
124
133
  * Backwards compatibility for MultiJson
125
134
 
126
- ### 0.4.1
135
+ ## 0.4.1
127
136
 
128
137
  * Updated Launchy dependency
129
138
 
130
- ### 0.4.0
139
+ ## 0.4.0
131
140
 
132
141
  * Added OAuth 1 server implementation
133
142
  * Updated Faraday dependency
134
143
 
135
- ### 0.3.4
144
+ ## 0.3.4
136
145
 
137
146
  * Attempts to auto-detect CA cert location
138
147
 
139
- ### 0.3.3
148
+ ## 0.3.3
140
149
 
141
150
  * Request objects no longer recreated during processing
142
151
  * Faraday middleware now supported
143
152
  * Streamed requests now supported
144
153
  * Fixed assertion profiles; client ID/secret omission no longer an error
145
154
 
146
- ### 0.3.2
155
+ ## 0.3.2
147
156
 
148
157
  * Added audience security check for ID tokens
149
158
 
150
- ### 0.3.1
159
+ ## 0.3.1
151
160
 
152
161
  * Fixed a warning while determining grant type
153
162
  * Removed requirement that a connection be supplied when authorizing requests
@@ -155,52 +164,52 @@ Rerelease of 0.13.1.
155
164
  * Fixed some documentation stuff around markdown formatting
156
165
  * Added support for Google Code wiki format output when generating docs
157
166
 
158
- ### 0.3.0
167
+ ## 0.3.0
159
168
 
160
169
  * Replaced httpadapter gem dependency with faraday
161
170
  * Replaced json gem dependency with multi_json
162
171
  * Updated to OAuth 2.0 draft 22
163
172
  * Complete test coverage
164
173
 
165
- ### 0.2.4
174
+ ## 0.2.4
166
175
 
167
176
  * Updated to incorporate changes to the Google OAuth endpoints
168
177
 
169
- ### 0.2.3
178
+ ## 0.2.3
170
179
 
171
180
  * Added support for JWT-formatted ID tokens.
172
181
  * Added :issued_at option to #update_token! method.
173
182
 
174
- ### 0.2.2
183
+ ## 0.2.2
175
184
 
176
185
  * Lowered requirements for json gem
177
186
 
178
- ### 0.2.1
187
+ ## 0.2.1
179
188
 
180
189
  * Updated to keep in sync with the new httpadapter changes
181
190
 
182
- ### 0.2.0
191
+ ## 0.2.0
183
192
 
184
193
  * Added support for OAuth 2.0 draft 10
185
194
 
186
- ### 0.1.4
195
+ ## 0.1.4
187
196
 
188
197
  * Added support for a two-legged authorization flow
189
198
 
190
- ### 0.1.3
199
+ ## 0.1.3
191
200
 
192
201
  * Fixed issue with headers passed in as a Hash
193
202
  * Fixed incompatibilities with Ruby 1.8.6
194
203
 
195
- ### 0.1.2
204
+ ## 0.1.2
196
205
 
197
206
  * Fixed bug with overzealous normalization
198
207
 
199
- ### 0.1.1
208
+ ## 0.1.1
200
209
 
201
210
  * Fixed bug with missing StringIO require
202
211
  * Fixed issue with dependency on unreleased features of addressable
203
212
 
204
- ### 0.1.0
213
+ ## 0.1.0
205
214
 
206
215
  * Initial release
@@ -178,7 +178,7 @@ module Signet #:nodoc:
178
178
  query: parsed_uri.query,
179
179
  fragment: parsed_uri.fragment
180
180
  )
181
- uri_parameters = uri.query_values.to_a
181
+ uri_parameters = uri.query_values(Array) || []
182
182
  uri = uri.omit(:query, :fragment).to_s
183
183
  merged_parameters =
184
184
  uri_parameters.concat(parameters.map { |k, v| [k, v] })
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
 
15
15
  module Signet
16
- VERSION = "0.14.0".freeze
16
+ VERSION = "0.14.1".freeze
17
17
  end
@@ -282,6 +282,32 @@ describe Signet::OAuth1 do
282
282
  )
283
283
  end
284
284
 
285
+ it "should correctly generate a base signature with duplicated query params" do
286
+ method = "GET"
287
+ uri = "http://photos.example.net/photos?foo=bar&foo=baz&foo=qux"
288
+ parameters = {
289
+ "oauth_consumer_key" => "dpf43f3p2l4k3l03",
290
+ "oauth_token" => "nnch734d00sl2jdk",
291
+ "oauth_signature_method" => "HMAC-SHA1",
292
+ "oauth_timestamp" => "1191242096",
293
+ "oauth_nonce" => "kllo9940pd9333jh",
294
+ "oauth_version" => "1.0",
295
+ "file" => "vacation.jpg",
296
+ "size" => "original"
297
+ }
298
+ expect(Signet::OAuth1.generate_base_string(method, uri, parameters)).to eq(
299
+ "GET&http%3A%2F%2Fphotos.example.net%2Fphotos&file%3Dvacation.jpg%26" \
300
+ "foo%3Dbar%26" \
301
+ "foo%3Dbaz%26" \
302
+ "foo%3Dqux%26" \
303
+ "oauth_consumer_key%3Ddpf43f3p2l4k3l03%26" \
304
+ "oauth_nonce%3Dkllo9940pd9333jh%26" \
305
+ "oauth_signature_method%3DHMAC-SHA1%26" \
306
+ "oauth_timestamp%3D1191242096%26oauth_token%3Dnnch734d00sl2jdk%26" \
307
+ "oauth_version%3D1.0%26size%3Doriginal"
308
+ )
309
+ end
310
+
285
311
  it "should correctly generate an authorization header" do
286
312
  parameters = [
287
313
  %w[oauth_consumer_key 0685bd9184jfhq22],
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: signet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Aman
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-04-02 00:00:00.000000000 Z
12
+ date: 2021-01-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: addressable
@@ -248,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
248
248
  - !ruby/object:Gem::Version
249
249
  version: 1.3.5
250
250
  requirements: []
251
- rubygems_version: 3.0.6
251
+ rubygems_version: 3.2.6
252
252
  signing_key:
253
253
  specification_version: 4
254
254
  summary: Signet is an OAuth 1.0 / OAuth 2.0 implementation.