oauth 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -1
- data/lib/oauth/consumer.rb +45 -42
- data/lib/oauth/version.rb +1 -1
- data/lib/oauth.rb +1 -0
- metadata +25 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6209290a96231a2cca740d8fbfec7831e97f7b2b848997ebae0ea1a130a48a3d
|
4
|
+
data.tar.gz: 34689bed290728cb8e628bce2fd781fbec783b2dca832267093a228ef247e8ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1725bcd2a976993bba7a2b61da4b24dd2b5086dfd01da52724f21dac2e87f7fff9ca595c479716aeec8a490c3ad16bc4a308a93edfb6c9cc957afbd4f0805cd
|
7
|
+
data.tar.gz: 516b1f0823a5f8a294e5b27fa0eda305af35c77bfaf448dd17144f1d67f9d6f6ea2807b77827c62e3a583ad92f7b8a586e3812e518b06687ac05cc5e6649dc17
|
data/CHANGELOG.md
CHANGED
@@ -13,14 +13,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
13
13
|
|
14
14
|
### Removed
|
15
15
|
|
16
|
+
## [1.0.1] 2022-08-29
|
17
|
+
### Changed
|
18
|
+
* `OAuth::Comsumer#options` hash is now handled by `snaky_hash`, which was extracted from `oauth2`
|
19
|
+
* symbolized keys, dot-access and snake-case are now normalized
|
20
|
+
|
16
21
|
## [1.0.0] 2022-08-23
|
17
22
|
### Changed
|
18
23
|
* Dropped support for Ruby < 2.7
|
24
|
+
* Dropped support for Rails < 6
|
19
25
|
|
20
26
|
### Added
|
21
27
|
* New EOL Policy
|
22
28
|
* Non-commercial support for the oldest version of Ruby (which itself is going EOL) will be dropped each year in April
|
23
29
|
|
30
|
+
## [0.6.2] 2022-08-29
|
31
|
+
### Changed
|
32
|
+
* `OAuth::Comsumer#options` hash is now handled by `snaky_hash`, which was extracted from `oauth2`
|
33
|
+
* symbolized keys, dot-access and snake-case are now normalized
|
34
|
+
|
24
35
|
## [0.6.1] 2022-08-23
|
25
36
|
### Changed
|
26
37
|
* Fixed documentation in SECURITY.md
|
@@ -43,6 +54,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
43
54
|
### Removed
|
44
55
|
* Ruby 2.0, 2.1, 2.2, and 2.3 are no longer valid install targets
|
45
56
|
|
57
|
+
## [0.5.14] 2022-08-29
|
58
|
+
The "hopeful last 0.5.x" Release
|
59
|
+
|
60
|
+
### Fixed
|
61
|
+
* More typos fixed
|
62
|
+
|
46
63
|
## [0.5.13] 2022-08-23
|
47
64
|
The "I think I caught 'em all!" Release
|
48
65
|
|
@@ -439,10 +456,13 @@ but please have a look at the unit tests.
|
|
439
456
|
* Moved all non-Rails functionality from the Rails plugin:
|
440
457
|
http://code.google.com/p/oauth-plugin/
|
441
458
|
|
442
|
-
[Unreleased]: https://github.com/oauth-xx/oauth-ruby/compare/v1.0.
|
459
|
+
[Unreleased]: https://github.com/oauth-xx/oauth-ruby/compare/v1.0.1...main
|
460
|
+
[1.0.1]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v1.0.1
|
443
461
|
[1.0.0]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v1.0.0
|
462
|
+
[0.6.2]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.6.2
|
444
463
|
[0.6.1]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.6.1
|
445
464
|
[0.6.0]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.6.0
|
465
|
+
[0.5.14]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.14
|
446
466
|
[0.5.13]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.13
|
447
467
|
[0.5.12]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.12
|
448
468
|
[0.5.11]: https://github.com/oauth-xx/oauth-ruby/releases/tag/v0.5.11
|
data/lib/oauth/consumer.rb
CHANGED
@@ -30,47 +30,49 @@ module OAuth
|
|
30
30
|
end
|
31
31
|
CA_FILE = nil unless defined?(CA_FILE)
|
32
32
|
|
33
|
-
@@default_options =
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
33
|
+
@@default_options = SnakyHash::SymbolKeyed.new(
|
34
|
+
{
|
35
|
+
# Signature method used by server. Defaults to HMAC-SHA1
|
36
|
+
signature_method: "HMAC-SHA1",
|
37
|
+
|
38
|
+
# default paths on site. These are the same as the defaults set up by the generators
|
39
|
+
request_token_path: "/oauth/request_token",
|
40
|
+
authenticate_path: "/oauth/authenticate",
|
41
|
+
authorize_path: "/oauth/authorize",
|
42
|
+
access_token_path: "/oauth/access_token",
|
43
|
+
|
44
|
+
proxy: nil,
|
45
|
+
# How do we send the oauth values to the server see
|
46
|
+
# https://oauth.net/core/1.0/#consumer_req_param for more info
|
47
|
+
#
|
48
|
+
# Possible values:
|
49
|
+
#
|
50
|
+
# :header - via the Authorize header (Default) ( option 1. in spec)
|
51
|
+
# :body - url form encoded in body of POST request ( option 2. in spec)
|
52
|
+
# :query_string - via the query part of the url ( option 3. in spec)
|
53
|
+
scheme: :header,
|
54
|
+
|
55
|
+
# Default http method used for OAuth Token Requests (defaults to :post)
|
56
|
+
http_method: :post,
|
57
|
+
|
58
|
+
# Add a custom ca_file for consumer
|
59
|
+
# :ca_file => '/etc/certs.pem'
|
60
|
+
|
61
|
+
# Possible values:
|
62
|
+
#
|
63
|
+
# nil, false - no debug output
|
64
|
+
# true - uses $stdout
|
65
|
+
# some_value - uses some_value
|
66
|
+
debug_output: nil,
|
67
|
+
|
68
|
+
# Defaults to producing a body_hash as part of the signature but
|
69
|
+
# can be disabled since it's not officially part of the OAuth 1.0
|
70
|
+
# spec. Possible values are true and false
|
71
|
+
body_hash_enabled: true,
|
72
|
+
|
73
|
+
oauth_version: "1.0"
|
74
|
+
}
|
75
|
+
)
|
74
76
|
|
75
77
|
attr_accessor :options, :key, :secret
|
76
78
|
attr_writer :site, :http
|
@@ -103,7 +105,8 @@ module OAuth
|
|
103
105
|
@secret = consumer_secret
|
104
106
|
|
105
107
|
# ensure that keys are symbols
|
106
|
-
|
108
|
+
snaky_options = SnakyHash::SymbolKeyed.new(options)
|
109
|
+
@options = @@default_options.merge(snaky_options)
|
107
110
|
end
|
108
111
|
|
109
112
|
# The default http method
|
data/lib/oauth/version.rb
CHANGED
data/lib/oauth.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oauth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pelle Braendgaard
|
@@ -16,8 +16,22 @@ authors:
|
|
16
16
|
autorequire:
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
|
-
date: 2022-08-
|
19
|
+
date: 2022-08-29 00:00:00.000000000 Z
|
20
20
|
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: snaky_hash
|
23
|
+
requirement: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '2.0'
|
28
|
+
type: :runtime
|
29
|
+
prerelease: false
|
30
|
+
version_requirements: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '2.0'
|
21
35
|
- !ruby/object:Gem::Dependency
|
22
36
|
name: version_gem
|
23
37
|
requirement: !ruby/object:Gem::Requirement
|
@@ -254,23 +268,23 @@ licenses:
|
|
254
268
|
- MIT
|
255
269
|
metadata:
|
256
270
|
homepage_uri: https://github.com/oauth-xx/oauth-ruby
|
257
|
-
source_code_uri: https://github.com/oauth-xx/oauth-ruby/tree/v1.0.
|
258
|
-
changelog_uri: https://github.com/oauth-xx/oauth-ruby/blob/v1.0.
|
271
|
+
source_code_uri: https://github.com/oauth-xx/oauth-ruby/tree/v1.0.1
|
272
|
+
changelog_uri: https://github.com/oauth-xx/oauth-ruby/blob/v1.0.1/CHANGELOG.md
|
259
273
|
bug_tracker_uri: https://github.com/oauth-xx/oauth-ruby/issues
|
260
|
-
documentation_uri: https://www.rubydoc.info/gems/oauth/1.0.
|
274
|
+
documentation_uri: https://www.rubydoc.info/gems/oauth/1.0.1
|
261
275
|
wiki_uri: https://github.com/oauth-xx/oauth-ruby/wiki
|
262
276
|
rubygems_mfa_required: 'true'
|
263
277
|
post_install_message: |2
|
264
278
|
|
265
|
-
You have installed oauth version 1.0.
|
279
|
+
You have installed oauth version 1.0.1, congratulations!
|
266
280
|
|
267
|
-
Non-commercial support for the 1.
|
268
|
-
The only breaking change will be dropped support for Ruby 2.7.
|
281
|
+
Non-commercial support for the 1.x series will end by April, 2025. Please make a plan to upgrade to the next version prior to that date.
|
282
|
+
The only breaking change will be dropped support for Ruby 2.7 and any other versions which will also have reached EOL by then.
|
269
283
|
|
270
284
|
Please see:
|
271
|
-
• https://github.com/oauth-xx/oauth/blob/main/SECURITY.md
|
285
|
+
• https://github.com/oauth-xx/oauth-ruby/blob/main/SECURITY.md
|
272
286
|
|
273
|
-
Note also that I, and this project,
|
287
|
+
Note also that I am, and this project is, in the process of leaving Github.
|
274
288
|
I wrote about some of the reasons here:
|
275
289
|
• https://dev.to/galtzo/im-leaving-github-50ba
|
276
290
|
|
@@ -300,7 +314,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
300
314
|
- !ruby/object:Gem::Version
|
301
315
|
version: '0'
|
302
316
|
requirements: []
|
303
|
-
rubygems_version: 3.
|
317
|
+
rubygems_version: 3.3.21
|
304
318
|
signing_key:
|
305
319
|
specification_version: 4
|
306
320
|
summary: OAuth Core Ruby implementation
|