oauth2 2.0.11 → 2.0.12
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +25 -1
- data/CONTRIBUTING.md +2 -2
- data/README.md +102 -31
- data/SECURITY.md +18 -9
- data/lib/oauth2/strategy/assertion.rb +4 -1
- data/lib/oauth2/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +17 -23
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3c3d9d7db53b8fd6bfda9314ac4f6ebde44a08d8f9544c909b055dd5d1a5c37
|
4
|
+
data.tar.gz: cfe4790fb04182fc2357d1015988f9b4bf77540f350a998a448fadb43c75d510
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b66e35c72d4f4ba2e38cb3a2147bc5aca5c05a5675d04515b2927f0c3c687444348b309799383a960351d106a8fbc1fa6a6bba08e672cef22059d1d4c03cbc26
|
7
|
+
data.tar.gz: 55395528b41b5487eb5ef1f8ab2800028f63b51ef2d889d06d4e16237bc470d3cc8c7c9ec8ba8e895988665e6c9a9f5ad84e513de6dad66b276873eae85fbaad
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -12,6 +12,28 @@ and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.
|
|
12
12
|
### Fixed
|
13
13
|
### Security
|
14
14
|
|
15
|
+
## [2.0.12] - 2025-05-31
|
16
|
+
- TAG: [v2.0.12][2.0.12t]
|
17
|
+
- Line Coverage: 100.0% (520 / 520)
|
18
|
+
- Branch Coverage: 100.0% (174 / 174)
|
19
|
+
- 80.00% documented
|
20
|
+
### Added
|
21
|
+
- [gh652][gh652] - Support IETF rfc7515 JSON Web Signature - JWS by @mridang
|
22
|
+
- Support JWT `kid` for key discovery and management
|
23
|
+
- More Documentation by @pboling
|
24
|
+
- Documented Serialization Extensions
|
25
|
+
- Added Gatzo.com FLOSS logo by @Aboling0, CC BY-SA 4.0
|
26
|
+
- Documentation site @ https://oauth2.galtzo.com now complete
|
27
|
+
### Changed
|
28
|
+
- Updates to gemspec (email, funding url, post install message)
|
29
|
+
### Deprecated
|
30
|
+
### Removed
|
31
|
+
### Fixed
|
32
|
+
- Documentation Typos by @pboling
|
33
|
+
### Security
|
34
|
+
|
35
|
+
[gh652]: https://github.com/oauth-xx/oauth2/pull/652
|
36
|
+
|
15
37
|
## [2.0.11] - 2025-05-23
|
16
38
|
- TAG: [v2.0.11][2.0.11t]
|
17
39
|
- COVERAGE: 100.00% -- 518/518 lines in 14 files
|
@@ -395,7 +417,9 @@ and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.
|
|
395
417
|
|
396
418
|
[gemfiles/readme]: gemfiles/README.md
|
397
419
|
|
398
|
-
[Unreleased]: https://gitlab.com/oauth-xx/oauth2/-/compare/v2.0.
|
420
|
+
[Unreleased]: https://gitlab.com/oauth-xx/oauth2/-/compare/v2.0.12...HEAD
|
421
|
+
[2.0.12]: https://gitlab.com/oauth-xx/oauth2/-/compare/v2.0.11...v2.0.12
|
422
|
+
[2.0.12t]: https://gitlab.com/oauth-xx/oauth2/-/tags/v2.0.12
|
399
423
|
[2.0.11]: https://gitlab.com/oauth-xx/oauth2/-/compare/v2.0.10...v2.0.11
|
400
424
|
[2.0.11t]: https://gitlab.com/oauth-xx/oauth2/-/tags/v2.0.11
|
401
425
|
[2.0.10]: https://gitlab.com/oauth-xx/oauth2/-/compare/v2.0.9...v2.0.10
|
data/CONTRIBUTING.md
CHANGED
@@ -96,7 +96,7 @@ NOTE: To build without signing the gem you must set `SKIP_GEM_SIGNING` to some v
|
|
96
96
|
|
97
97
|
### To release a new version:
|
98
98
|
|
99
|
-
1. Run `bin/setup && bin/rake` as a
|
99
|
+
1. Run `bin/setup && bin/rake` as a "test, coverage, & linting" sanity check
|
100
100
|
2. Update the version number in `version.rb`, and ensure `CHANGELOG.md` reflects changes
|
101
101
|
3. Run `bin/setup && bin/rake` again as a secondary check, and to update `Gemfile.lock`
|
102
102
|
4. Run `git commit -am "🔖 Prepare release v<VERSION>"` to commit the changes
|
@@ -114,7 +114,7 @@ NOTE: To build without signing the gem you must set `SKIP_GEM_SIGNING` to some v
|
|
114
114
|
11. Run `bin/gem_checksums` (more context [1][🔒️rubygems-checksums-pr], [2][🔒️rubygems-guides-pr])
|
115
115
|
to create SHA-256 and SHA-512 checksums. This functionality is provided by the `stone_checksums`
|
116
116
|
[gem][💎stone_checksums].
|
117
|
-
- Checksums will be committed automatically by the script
|
117
|
+
- Checksums will be committed automatically by the script but not pushed
|
118
118
|
12. Run `bundle exec rake release` which will create a git tag for the version,
|
119
119
|
push git commits and tags, and push the `.gem` file to [rubygems.org][💎rubygems]
|
120
120
|
|
data/README.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
<p align="center">
|
2
|
+
<a href="https://discord.gg/3qme4XHNKN" target="_blank" rel="noopener">
|
3
|
+
<img width="124px" src="https://github.com/oauth-xx/oauth2/raw/main/docs/images/logo/galtzo-floss-logos-original.svg?raw=true" alt="Galtzo.com Logo by Aboling0, CC BY-SA 4.0">
|
4
|
+
</a>
|
2
5
|
<a href="http://oauth.net/2/" target="_blank" rel="noopener">
|
3
6
|
<img src="https://github.com/oauth-xx/oauth2/raw/main/docs/images/logo/oauth2-logo-124px.png?raw=true" alt="OAuth 2.0 Logo by Chris Messina, CC BY-SA 3.0">
|
4
7
|
</a>
|
@@ -48,14 +51,14 @@ covering the latest patch for each of the following minor versions:
|
|
48
51
|
* MRI Ruby @ v2.3, v2.4, v2.5, v2.6, v2.7, v3.0, v3.1, v3.2, v3.3, v3.4, HEAD
|
49
52
|
* NOTE: This gem will still install on ruby v2.2, but vanilla GitHub Actions no longer supports testing against it, so YMMV.
|
50
53
|
* JRuby @ v9.2, v9.3, v9.4, v10.0, HEAD
|
51
|
-
* TruffleRuby @ v23.1,
|
54
|
+
* TruffleRuby @ v23.1, v24.1, HEAD
|
52
55
|
* gem `faraday` @ v0, v1, v2, HEAD ⏩️ [lostisland/faraday](https://github.com/lostisland/faraday)
|
53
|
-
* gem `jwt` @ v1, v2, v3, HEAD ⏩️ [
|
54
|
-
* gem `logger` @ v1.2, v1.5, v1.7, HEAD ⏩️ [
|
56
|
+
* gem `jwt` @ v1, v2, v3, HEAD ⏩️ [jwt/ruby-jwt](https://github.com/jwt/ruby-jwt)
|
57
|
+
* gem `logger` @ v1.2, v1.5, v1.7, HEAD ⏩️ [ruby/logger](https://github.com/ruby/logger)
|
55
58
|
* gem `multi_xml` @ v0.5, v0.6, v0.7, HEAD ⏩️ [sferik/multi_xml](https://github.com/sferik/multi_xml)
|
56
59
|
* gem `rack` @ v1.2, v1.6, v2, v3, HEAD ⏩️ [rack/rack](https://github.com/rack/rack)
|
57
|
-
* gem `snaky_hash` @v2, HEAD ⏩️ [oauth-xx/snaky_hash](https://gitlab.com/oauth-xx/snaky_hash)
|
58
|
-
* gem `version_gem`
|
60
|
+
* gem `snaky_hash` @ v2, HEAD ⏩️ [oauth-xx/snaky_hash](https://gitlab.com/oauth-xx/snaky_hash)
|
61
|
+
* gem `version_gem` @ v1, HEAD ⏩️ [oauth-xx/version_gem](https://gitlab.com/oauth-xx/version_gem)
|
59
62
|
|
60
63
|
The last two were extracted from this gem. They are part of the `oauth-xx` org,
|
61
64
|
and are developed in tight collaboration with this gem.
|
@@ -160,11 +163,12 @@ One of these might be what you are looking for:
|
|
160
163
|
### Version 2.0.x
|
161
164
|
|
162
165
|
<details>
|
163
|
-
<summary>2.0.x
|
166
|
+
<summary>2.0.x CHANGELOG and README</summary>
|
164
167
|
|
165
168
|
| Version | Release Date | CHANGELOG | README |
|
166
169
|
|---------|--------------|---------------------------------------|---------------------------------|
|
167
|
-
| 2.0.
|
170
|
+
| 2.0.12 | 2025-05-31 | [v2.0.12 CHANGELOG][2.0.12-changelog] | [v2.0.12 README][2.0.12-readme] |
|
171
|
+
| 2.0.11 | 2025-05-23 | [v2.0.11 CHANGELOG][2.0.11-changelog] | [v2.0.11 README][2.0.11-readme] |
|
168
172
|
| 2.0.10 | 2025-05-17 | [v2.0.10 CHANGELOG][2.0.10-changelog] | [v2.0.10 README][2.0.10-readme] |
|
169
173
|
| 2.0.9 | 2022-09-16 | [v2.0.9 CHANGELOG][2.0.9-changelog] | [v2.0.9 README][2.0.9-readme] |
|
170
174
|
| 2.0.8 | 2022-09-01 | [v2.0.8 CHANGELOG][2.0.8-changelog] | [v2.0.8 README][2.0.8-readme] |
|
@@ -178,6 +182,7 @@ One of these might be what you are looking for:
|
|
178
182
|
| 2.0.0 | 2022-06-21 | [v2.0.0 CHANGELOG][2.0.0-changelog] | [v2.0.0 README][2.0.0-readme] |
|
179
183
|
</details>
|
180
184
|
|
185
|
+
[2.0.12-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#2012---2025-05-31
|
181
186
|
[2.0.11-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#2011---2025-05-23
|
182
187
|
[2.0.10-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#2010---2025-05-17
|
183
188
|
[2.0.9-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#209---2022-09-16
|
@@ -191,7 +196,8 @@ One of these might be what you are looking for:
|
|
191
196
|
[2.0.1-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#201---2022-06-22
|
192
197
|
[2.0.0-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#200---2022-06-21
|
193
198
|
|
194
|
-
[2.0.
|
199
|
+
[2.0.12-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.12/README.md
|
200
|
+
[2.0.11-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.11/README.md
|
195
201
|
[2.0.10-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.10/README.md
|
196
202
|
[2.0.9-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.9/README.md
|
197
203
|
[2.0.8-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.8/README.md
|
@@ -330,9 +336,11 @@ For more see [SECURITY.md][🔐security].
|
|
330
336
|
|
331
337
|
- Works with Ruby versions >= 2.2
|
332
338
|
- Drop support for the expired MAC Draft (all versions)
|
333
|
-
- Support IETF
|
334
|
-
- Support
|
335
|
-
- Support IETF
|
339
|
+
- Support IETF rfc7515 JSON Web Signature - JWS (since v2.0.12)
|
340
|
+
- Support JWT `kid` for key discovery and management
|
341
|
+
- Support IETF rfc7523 JWT Bearer Tokens (since v2.0.0)
|
342
|
+
- Support IETF rfc7231 Relative Location in Redirect (since v2.0.0)
|
343
|
+
- Support IETF rfc6749 Don't set oauth params when nil (since v2.0.0)
|
336
344
|
- Support IETF rfc7009 Token Revocation (since v2.0.10)
|
337
345
|
- Support [OIDC 1.0 Private Key JWT](https://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication); based on the OAuth JWT assertion specification [(RFC 7523)](https://tools.ietf.org/html/rfc7523)
|
338
346
|
- Support new formats, including from [jsonapi.org](http://jsonapi.org/format/): `application/vdn.api+json`, `application/vnd.collection+json`, `application/hal+json`, `application/problem+json`
|
@@ -485,16 +493,90 @@ response.parsed.class.name # => SnakyHash::StringKeyed (from snaky_hash g
|
|
485
493
|
|
486
494
|
As of v2.0.11, if you need to serialize the parsed result, you can!
|
487
495
|
|
488
|
-
There are two ways to do this,
|
496
|
+
There are two ways to do this, globally, or discretely. The discrete way is recommended.
|
489
497
|
|
490
498
|
1. Globally configure `SnakyHash::StringKeyed` to use the serializer. Put this in your code somewhere reasonable (like an initializer for Rails):
|
491
499
|
|
492
|
-
```ruby
|
500
|
+
```ruby
|
493
501
|
SnakyHash::StringKeyed.class_eval do
|
494
502
|
extend SnakyHash::Serializer
|
503
|
+
end
|
504
|
+
```
|
505
|
+
|
506
|
+
2. Discretely configure a custom Snaky Hash class to use the serializer:
|
507
|
+
|
508
|
+
```ruby
|
509
|
+
class MySnakyHash < SnakyHash::StringKeyed
|
510
|
+
# Give this hash class `dump` and `load` abilities!
|
511
|
+
extend SnakyHash::Serializer
|
512
|
+
end
|
513
|
+
|
514
|
+
# And tell your client to use the custom class in each call:
|
515
|
+
client = OAuth2::Client.new("client_id", "client_secret", site: "https://example.org/oauth2")
|
516
|
+
token = client.get_token({snaky_hash_klass: MySnakyHash})
|
517
|
+
```
|
518
|
+
|
519
|
+
##### Serialization Extensions
|
520
|
+
|
521
|
+
There are a few hacks you may need in your class to support Ruby < 2.4.2 or < 2.6.
|
522
|
+
They are likely not needed if you are on a newer Ruby.
|
523
|
+
See `response_spec.rb` if you need to study the hacks for older Rubies.
|
524
|
+
|
525
|
+
```ruby
|
526
|
+
class MySnakyHash < SnakyHash::StringKeyed
|
527
|
+
# Give this hash class `dump` and `load` abilities!
|
528
|
+
extend SnakyHash::Serializer
|
529
|
+
|
530
|
+
#### Serialization Extentions
|
531
|
+
#
|
532
|
+
# Act on the non-hash values (including the values of hashes) as they are dumped to JSON
|
533
|
+
# In other words, this retains nested hashes, and only the deepest leaf nodes become bananas.
|
534
|
+
# WARNING: This is a silly example!
|
535
|
+
dump_value_extensions.add(:to_fruit) do |value|
|
536
|
+
"banana" # => Make values "banana" on dump
|
537
|
+
end
|
538
|
+
|
539
|
+
# Act on the non-hash values (including the values of hashes) as they are loaded from the JSON dump
|
540
|
+
# In other words, this retains nested hashes, and only the deepest leaf nodes become ***.
|
541
|
+
# WARNING: This is a silly example!
|
542
|
+
load_value_extensions.add(:to_stars) do |value|
|
543
|
+
"***" # Turn dumped bananas into *** when they are loaded
|
544
|
+
end
|
545
|
+
|
546
|
+
# Act on the entire hash as it is prepared for dumping to JSON
|
547
|
+
# WARNING: This is a silly example!
|
548
|
+
dump_hash_extensions.add(:to_cheese) do |value|
|
549
|
+
if value.is_a?(Hash)
|
550
|
+
value.transform_keys do |key|
|
551
|
+
split = key.split("_")
|
552
|
+
first_word = split[0]
|
553
|
+
key.sub(first_word, "cheese")
|
554
|
+
end
|
555
|
+
else
|
556
|
+
value
|
557
|
+
end
|
558
|
+
end
|
559
|
+
|
560
|
+
# Act on the entire hash as it is loaded from the JSON dump
|
561
|
+
# WARNING: This is a silly example!
|
562
|
+
load_hash_extensions.add(:to_pizza) do |value|
|
563
|
+
if value.is_a?(Hash)
|
564
|
+
res = klass.new
|
565
|
+
value.keys.each_with_object(res) do |key, result|
|
566
|
+
split = key.split("_")
|
567
|
+
last_word = split[-1]
|
568
|
+
new_key = key.sub(last_word, "pizza")
|
569
|
+
result[new_key] = value[key]
|
570
|
+
end
|
571
|
+
res
|
572
|
+
else
|
573
|
+
value
|
574
|
+
end
|
575
|
+
end
|
495
576
|
end
|
496
577
|
```
|
497
578
|
|
579
|
+
See `response_spec.rb`, or the [oauth-xx/snaky_hash](https://gitlab.com/oauth-xx/snaky_hash) gem for more ideas.
|
498
580
|
|
499
581
|
#### What if I hate snakes and/or indifference?
|
500
582
|
|
@@ -612,10 +694,6 @@ access = client.auth_code.get_token("code_value", redirect_uri: "http://localhos
|
|
612
694
|
You can always use the `#request` method on the `OAuth2::Client` instance to make
|
613
695
|
requests for tokens for any Authentication grant type.
|
614
696
|
|
615
|
-
### 🚀 Release Instructions
|
616
|
-
|
617
|
-
See [CONTRIBUTING.md][🤝contributing].
|
618
|
-
|
619
697
|
## 🔐 Security
|
620
698
|
|
621
699
|
See [SECURITY.md][🔐security].
|
@@ -630,6 +708,10 @@ We [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] so if you m
|
|
630
708
|
|
631
709
|
See [CONTRIBUTING.md][🤝contributing] for more detailed instructions.
|
632
710
|
|
711
|
+
### 🚀 Release Instructions
|
712
|
+
|
713
|
+
See [CONTRIBUTING.md][🤝contributing].
|
714
|
+
|
633
715
|
### Code Coverage
|
634
716
|
|
635
717
|
[![Coveralls Test Coverage][🔑coveralls-img]][🔑coveralls]
|
@@ -706,10 +788,10 @@ See [LICENSE.txt][📄license] for the official [Copyright Notice][📄copyright
|
|
706
788
|
<ul>
|
707
789
|
<li>
|
708
790
|
2017 - 2025 Peter H. Boling, of
|
709
|
-
<a href="https://
|
710
|
-
|
791
|
+
<a href="https://discord.gg/3qme4XHNKN">
|
792
|
+
Galtzo.com
|
711
793
|
<picture>
|
712
|
-
|
794
|
+
<img src="https://github.com/oauth-xx/oauth2/raw/main/docs/images/logo/galtzo-floss-logos-wordless.svg?raw=true" alt="Galtzo.com Logo by Aboling0, CC BY-SA 4.0" height="20">
|
713
795
|
</picture>
|
714
796
|
</a>, and oauth2 contributors
|
715
797
|
</li>
|
@@ -912,14 +994,3 @@ or one of the others at the head of this README.
|
|
912
994
|
<a rel="me" alt="Follow me on Ruby.social" href="https://ruby.social/@galtzo"><img src="https://img.shields.io/mastodon/follow/109447111526622197?domain=https%3A%2F%2Fruby.social&style=social&label=Follow%20%40galtzo%20on%20Ruby.social"></a>
|
913
995
|
<a rel="me" alt="Follow me on FLOSS.social" href="https://floss.social/@galtzo"><img src="https://img.shields.io/mastodon/follow/110304921404405715?domain=https%3A%2F%2Ffloss.social&style=social&label=Follow%20%40galtzo%20on%20Floss.social"></a>
|
914
996
|
</details>
|
915
|
-
|
916
|
-
<details>
|
917
|
-
<summary>Deprecated Badges</summary>
|
918
|
-
|
919
|
-
CodeCov currently fails to parse the coverage upload.
|
920
|
-
|
921
|
-
[![CodeCov Test Coverage][🔑codecovi♻️]][🔑codecov]
|
922
|
-
|
923
|
-
[![Coverage Graph][🔑codecov-g♻️]][🔑codecov]
|
924
|
-
|
925
|
-
</details>
|
data/SECURITY.md
CHANGED
@@ -2,25 +2,34 @@
|
|
2
2
|
|
3
3
|
## Supported Versions
|
4
4
|
|
5
|
-
| Version | Supported |
|
6
|
-
|
7
|
-
| 2.latest | ✅ |
|
8
|
-
| 1.latest | ✅ |
|
9
|
-
| <= 1 | ⛔ | ⛔
|
5
|
+
| Version | Supported | Post-EOL / Enterprise |
|
6
|
+
|----------|-----------|---------------------------------------|
|
7
|
+
| 2.latest | ✅ | [Tidelift Subscription][tidelift-ref] |
|
8
|
+
| 1.latest | ✅ | [Tidelift Subscription][tidelift-ref] |
|
9
|
+
| <= 1 | ⛔ | ⛔ |
|
10
10
|
|
11
11
|
### EOL Policy
|
12
12
|
|
13
13
|
Non-commercial support for the oldest version of Ruby (which itself is going EOL) will be dropped each year in April.
|
14
14
|
|
15
|
-
##
|
15
|
+
## Security contact information
|
16
16
|
|
17
|
-
To report a security vulnerability, please use the
|
17
|
+
To report a security vulnerability, please use the
|
18
|
+
[Tidelift security contact](https://tidelift.com/security).
|
18
19
|
Tidelift will coordinate the fix and disclosure.
|
19
20
|
|
20
|
-
##
|
21
|
+
## Additional Support
|
22
|
+
|
23
|
+
If you are interested in support for versions older than the latest release,
|
24
|
+
please consider sponsoring the project / maintainer @ https://liberapay.com/pboling/donate,
|
25
|
+
or find other sponsorship links in the [README].
|
26
|
+
|
27
|
+
[README]: README.md
|
28
|
+
|
29
|
+
## Enterprise Support
|
21
30
|
|
22
31
|
Available as part of the Tidelift Subscription.
|
23
32
|
|
24
|
-
The maintainers of
|
33
|
+
The maintainers of this library and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. [Learn more.][tidelift-ref]
|
25
34
|
|
26
35
|
[tidelift-ref]: https://tidelift.com/subscription/pkg/rubygems-oauth2?utm_source=rubygems-oauth2&utm_medium=referral&utm_campaign=enterprise&utm_term=repo
|
@@ -95,7 +95,10 @@ module OAuth2
|
|
95
95
|
def build_assertion(claims, encoding_opts)
|
96
96
|
raise ArgumentError.new(message: "Please provide an encoding_opts hash with :algorithm and :key") if !encoding_opts.is_a?(Hash) || (%i[algorithm key] - encoding_opts.keys).any?
|
97
97
|
|
98
|
-
|
98
|
+
headers = {}
|
99
|
+
headers[:kid] = encoding_opts[:kid] if encoding_opts.key?(:kid)
|
100
|
+
|
101
|
+
JWT.encode(claims, encoding_opts[:key], encoding_opts[:algorithm], headers)
|
99
102
|
end
|
100
103
|
end
|
101
104
|
end
|
data/lib/oauth2/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oauth2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Boling
|
@@ -37,7 +37,7 @@ cert_chain:
|
|
37
37
|
DVjBtqT23eugOqQ73umLcYDZkc36vnqGxUBSsXrzY9pzV5gGr2I8YUxMqf6ATrZt
|
38
38
|
L9nRqA==
|
39
39
|
-----END CERTIFICATE-----
|
40
|
-
date: 2025-05-
|
40
|
+
date: 2025-05-31 00:00:00.000000000 Z
|
41
41
|
dependencies:
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: faraday
|
@@ -365,8 +365,7 @@ dependencies:
|
|
365
365
|
version: '1.0'
|
366
366
|
description: Ruby wrapper for the OAuth 2.0 protocol
|
367
367
|
email:
|
368
|
-
-
|
369
|
-
- oauth-ruby@googlegroups.com
|
368
|
+
- floss@galtzo.com
|
370
369
|
executables: []
|
371
370
|
extensions: []
|
372
371
|
extra_rdoc_files:
|
@@ -402,38 +401,33 @@ licenses:
|
|
402
401
|
- MIT
|
403
402
|
metadata:
|
404
403
|
homepage_uri: https://oauth2.galtzo.com/
|
405
|
-
source_code_uri: https://github.com/oauth-xx/oauth2/releases/tag//v2.0.
|
406
|
-
changelog_uri: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.
|
404
|
+
source_code_uri: https://github.com/oauth-xx/oauth2/releases/tag//v2.0.12
|
405
|
+
changelog_uri: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.12/CHANGELOG.md
|
407
406
|
bug_tracker_uri: https://gitlab.com/oauth-xx/oauth2/-/issues
|
408
|
-
documentation_uri: https://www.rubydoc.info/gems/oauth2/2.0.
|
407
|
+
documentation_uri: https://www.rubydoc.info/gems/oauth2/2.0.12
|
409
408
|
wiki_uri: https://gitlab.com/oauth-xx/oauth2/-/wiki
|
410
409
|
mailing_list_uri: https://groups.google.com/g/oauth-ruby
|
411
|
-
funding_uri: https://
|
410
|
+
funding_uri: https://github.com/sponsors/pboling
|
412
411
|
news_uri: https://www.railsbling.com/tags/oauth2
|
413
412
|
rubygems_mfa_required: 'true'
|
414
413
|
post_install_message: |2
|
415
414
|
|
416
|
-
|
415
|
+
---+++ oauth2 v2.0.12 +++---
|
417
416
|
|
418
|
-
There are BREAKING
|
417
|
+
There are BREAKING CHANGES when upgrading from < v2
|
418
|
+
Most will not encounter them, and updating your code should be easy!
|
419
419
|
Please see:
|
420
420
|
• https://gitlab.com/oauth-xx/oauth2/-/blob/main/SECURITY.md
|
421
|
-
• https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.
|
421
|
+
• https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.12/CHANGELOG.md#200-2022-06-21-tag
|
422
422
|
• Summary of most important breaking changes: https://gitlab.com/oauth-xx/oauth2#what-is-new-for-v20
|
423
423
|
|
424
|
-
|
425
|
-
|
426
|
-
https://
|
427
|
-
|
428
|
-
Important News:
|
429
|
-
1. Google Group is "active" (again)!
|
430
|
-
• https://groups.google.com/g/oauth-ruby/c/QA_dtrXWXaE
|
431
|
-
2. Non-commercial support for the 2.x series will end by April, 2026. Please make a plan to upgrade to the next version prior to that date.
|
424
|
+
News:
|
425
|
+
1. New documentation website: https://oauth2.galtzo.com
|
426
|
+
2. Discord for discussion and support: https://discord.gg/3qme4XHNKN
|
427
|
+
3. Non-commercial support for the 2.x series will end by April, 2026. Please make a plan to upgrade to the next version prior to that date.
|
432
428
|
Support will be dropped for Ruby 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0, 3.1 and any other Ruby versions which will also have reached EOL by then.
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
If you are sentient, please consider a donation as I move toward supporting myself with Open Source work:
|
429
|
+
4. Gem releases are now cryptographically signed with a 20-year cert, with checksums by stone_checksums.
|
430
|
+
5. Please consider supporting this project, and my other open source work, with one of the following methods:
|
437
431
|
• https://liberapay.com/pboling
|
438
432
|
• https://ko-fi.com/pboling
|
439
433
|
• https://www.buymeacoffee.com/pboling
|
metadata.gz.sig
CHANGED
Binary file
|