oauth2 2.0.19 → 2.0.20
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 +26 -1
- data/README.md +1 -1
- data/REEK +2 -2
- data/lib/oauth2/auth_sanitizer.rb +36 -0
- data/lib/oauth2/client.rb +2 -2
- data/lib/oauth2/filtered_attributes.rb +2 -5
- data/lib/oauth2/version.rb +2 -1
- data/lib/oauth2.rb +4 -4
- data.tar.gz.sig +0 -0
- metadata +17 -10
- metadata.gz.sig +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a50435455bab3e2cbebb651d7b88494ee04268367f1f8ab3dbacb479f1637b65
|
|
4
|
+
data.tar.gz: f9b36d98b44a56fbfc6e73b59c44829aa6f28eb24c16141c5052e23019145dcc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 119ecedc64f4a158dcc0507b2da837ef2d44e6129803da0ebd383409a12670b43c892e596d2183a6e1095535ef0ed0e04769d4556f3111e392b12307a0c45e3c
|
|
7
|
+
data.tar.gz: 43bd592fbe5945d846b9791297ea307fe505a64e79b029b24302fe69fa246b57e7d279e1e87c1bf2c1cdc9e787a5d26e8fdbef15978dcfbb2efe277267d1628f
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,29 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [2.0.20] - 2026-05-20
|
|
34
|
+
|
|
35
|
+
- TAG: [v2.0.20][2.0.20t]
|
|
36
|
+
- COVERAGE: 99.62% -- 525/527 lines in 15 files
|
|
37
|
+
- BRANCH COVERAGE: 98.88% -- 176/178 branches in 15 files
|
|
38
|
+
- 88.35% documented
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- OAuth2::VERSION (Traditional Constant Location)
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
|
|
46
|
+
- auth-sanitizer v0.1.3
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
|
|
50
|
+
- [gh!721][gh!721] Load `auth-sanitizer` through an internal isolated loader so requiring `oauth2` does not add top-level `Auth` or `AuthSanitizer` constants that may collide with downstream applications by @pboling
|
|
51
|
+
|
|
52
|
+
### Security
|
|
53
|
+
|
|
54
|
+
[gh!721]: https://github.com/ruby-oauth/oauth2/pull/721
|
|
55
|
+
|
|
33
56
|
## [2.0.19] - 2026-05-15
|
|
34
57
|
|
|
35
58
|
- TAG: [v2.0.19][2.0.19t]
|
|
@@ -763,7 +786,9 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
763
786
|
|
|
764
787
|
[gemfiles/readme]: gemfiles/README.md
|
|
765
788
|
|
|
766
|
-
[Unreleased]: https://github.com/ruby-oauth/oauth2/compare/v2.0.
|
|
789
|
+
[Unreleased]: https://github.com/ruby-oauth/oauth2/compare/v2.0.20...HEAD
|
|
790
|
+
[2.0.20]: https://github.com/ruby-oauth/oauth2/compare/v2.0.19...v2.0.20
|
|
791
|
+
[2.0.20t]: https://github.com/ruby-oauth/oauth2/releases/tag/v2.0.20
|
|
767
792
|
[2.0.19]: https://github.com/ruby-oauth/oauth2/compare/v2.0.18...v2.0.19
|
|
768
793
|
[2.0.19t]: https://github.com/ruby-oauth/oauth2/releases/tag/v2.0.19
|
|
769
794
|
[2.0.18]: https://github.com/ruby-oauth/oauth2/compare/v2.0.17...v2.0.18
|
data/README.md
CHANGED
|
@@ -1514,7 +1514,7 @@ Thanks for RTFM. ☺️
|
|
|
1514
1514
|
[📌gitmoji]: https://gitmoji.dev
|
|
1515
1515
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
1516
1516
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
1517
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.
|
|
1517
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.527-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
1518
1518
|
[🔐security]: SECURITY.md
|
|
1519
1519
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
1520
1520
|
[🔐irp]: IRP.md
|
data/REEK
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
./reek: 1:
|
|
2
|
-
./reek: 2:
|
|
1
|
+
./reek: 1: ./reek:: not found
|
|
2
|
+
./reek: 2: ./reek:: not found
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OAuth2
|
|
4
|
+
AUTH_SANITIZER = begin
|
|
5
|
+
auth_sanitizer_requirement = Gem::Requirement.new("~> 0.1", ">= 0.1.3")
|
|
6
|
+
auth_sanitizer_spec = Gem.loaded_specs["auth-sanitizer"]
|
|
7
|
+
unless auth_sanitizer_spec && auth_sanitizer_requirement.satisfied_by?(auth_sanitizer_spec.version)
|
|
8
|
+
# :nocov:
|
|
9
|
+
auth_sanitizer_spec = Gem::Specification.find_by_name("auth-sanitizer", auth_sanitizer_requirement)
|
|
10
|
+
# :nocov:
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
auth_sanitizer_loader_path = File.join(
|
|
14
|
+
auth_sanitizer_spec.full_gem_path,
|
|
15
|
+
"lib/auth_sanitizer/loader.rb",
|
|
16
|
+
)
|
|
17
|
+
unless File.file?(auth_sanitizer_loader_path)
|
|
18
|
+
# :nocov:
|
|
19
|
+
raise LoadError, "oauth2 requires auth-sanitizer #{auth_sanitizer_requirement}; " \
|
|
20
|
+
"loader not found at #{auth_sanitizer_loader_path}"
|
|
21
|
+
# :nocov:
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
auth_sanitizer_loader_namespace = Module.new
|
|
25
|
+
auth_sanitizer_loader_namespace.module_eval(
|
|
26
|
+
File.read(auth_sanitizer_loader_path),
|
|
27
|
+
auth_sanitizer_loader_path,
|
|
28
|
+
1,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
auth_sanitizer_loader_namespace.
|
|
32
|
+
const_get(:AuthSanitizer).
|
|
33
|
+
const_get(:Loader).
|
|
34
|
+
load_isolated
|
|
35
|
+
end
|
|
36
|
+
end
|
data/lib/oauth2/client.rb
CHANGED
|
@@ -42,7 +42,7 @@ module OAuth2
|
|
|
42
42
|
# @option options [Hash] :connection_opts ({}) Hash of connection options to pass to initialize Faraday
|
|
43
43
|
# @option options [Boolean] :raise_errors (true) whether to raise an OAuth2::Error on responses with 400+ status codes
|
|
44
44
|
# @option options [Integer] :max_redirects (5) maximum number of redirects to follow
|
|
45
|
-
# @option options [Logger] :logger (::Logger.new($stdout)) Logger instance for HTTP request/response output; requires OAUTH_DEBUG to be true. When debug logging is enabled, sensitive values are filtered using {
|
|
45
|
+
# @option options [Logger] :logger (::Logger.new($stdout)) Logger instance for HTTP request/response output; requires OAUTH_DEBUG to be true. When debug logging is enabled, sensitive values are filtered using {OAuth2::AUTH_SANITIZER::SanitizedLogger} initialized from `OAuth2.config[:filtered_label]` and the key names in `OAuth2.config[:filtered_debug_keys]`.
|
|
46
46
|
# @option options [Class] :access_token_class (AccessToken) class to use for access tokens; you can subclass OAuth2::AccessToken, @version 2.0+
|
|
47
47
|
# @option options [Hash] :ssl SSL options for Faraday
|
|
48
48
|
#
|
|
@@ -565,7 +565,7 @@ module OAuth2
|
|
|
565
565
|
def oauth_debug_logging(builder)
|
|
566
566
|
builder.response(
|
|
567
567
|
:logger,
|
|
568
|
-
|
|
568
|
+
OAuth2::AUTH_SANITIZER::SanitizedLogger.new(
|
|
569
569
|
options[:logger],
|
|
570
570
|
filtered_keys: OAuth2.config[:filtered_debug_keys],
|
|
571
571
|
label: OAuth2.config[:filtered_label],
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module OAuth2
|
|
4
|
-
# Permanent alias for {
|
|
4
|
+
# Permanent alias for {OAuth2::AUTH_SANITIZER::FilteredAttributes}.
|
|
5
5
|
#
|
|
6
6
|
# This constant is intentionally kept in the `OAuth2` namespace because it
|
|
7
7
|
# was part of the public API before the implementation was extracted into the
|
|
8
8
|
# `auth-sanitizer` gem. It will **not** be deprecated or removed.
|
|
9
|
-
|
|
10
|
-
# New code that does not need the `OAuth2::` namespace can use
|
|
11
|
-
# {Auth::Sanitizer::FilteredAttributes} directly.
|
|
12
|
-
FilteredAttributes = Auth::Sanitizer::FilteredAttributes
|
|
9
|
+
FilteredAttributes = OAuth2::AUTH_SANITIZER::FilteredAttributes
|
|
13
10
|
end
|
data/lib/oauth2/version.rb
CHANGED
data/lib/oauth2.rb
CHANGED
|
@@ -5,12 +5,12 @@ require "cgi/escape"
|
|
|
5
5
|
require "time"
|
|
6
6
|
|
|
7
7
|
# third party gems
|
|
8
|
-
require "auth/sanitizer"
|
|
9
8
|
require "snaky_hash"
|
|
10
9
|
require "version_gem"
|
|
11
10
|
|
|
12
11
|
# includes gem files
|
|
13
12
|
require_relative "oauth2/version"
|
|
13
|
+
require_relative "oauth2/auth_sanitizer"
|
|
14
14
|
require_relative "oauth2/filtered_attributes"
|
|
15
15
|
require_relative "oauth2/error"
|
|
16
16
|
require_relative "oauth2/authenticator"
|
|
@@ -92,10 +92,10 @@ module OAuth2
|
|
|
92
92
|
end
|
|
93
93
|
end
|
|
94
94
|
|
|
95
|
-
# Wire
|
|
96
|
-
# FilteredAttributes-bearing objects and
|
|
95
|
+
# Wire OAuth2::AUTH_SANITIZER's label provider to read from OAuth2.config so that
|
|
96
|
+
# FilteredAttributes-bearing objects and OAuth2::AUTH_SANITIZER::SanitizedLogger instances
|
|
97
97
|
# pick up OAuth2.config[:filtered_label] at their initialization time.
|
|
98
|
-
|
|
98
|
+
OAuth2::AUTH_SANITIZER.filtered_label_provider = -> { OAuth2.config[:filtered_label] }
|
|
99
99
|
|
|
100
100
|
# Extend OAuth2::Version with VersionGem helpers to provide semantic version helpers.
|
|
101
101
|
OAuth2::Version.class_eval do
|
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.20
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter Boling
|
|
@@ -46,6 +46,9 @@ dependencies:
|
|
|
46
46
|
- - "~>"
|
|
47
47
|
- !ruby/object:Gem::Version
|
|
48
48
|
version: '0.1'
|
|
49
|
+
- - ">="
|
|
50
|
+
- !ruby/object:Gem::Version
|
|
51
|
+
version: 0.1.3
|
|
49
52
|
type: :runtime
|
|
50
53
|
prerelease: false
|
|
51
54
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -53,6 +56,9 @@ dependencies:
|
|
|
53
56
|
- - "~>"
|
|
54
57
|
- !ruby/object:Gem::Version
|
|
55
58
|
version: '0.1'
|
|
59
|
+
- - ">="
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: 0.1.3
|
|
56
62
|
- !ruby/object:Gem::Dependency
|
|
57
63
|
name: faraday
|
|
58
64
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -150,7 +156,7 @@ dependencies:
|
|
|
150
156
|
version: '2.0'
|
|
151
157
|
- - ">="
|
|
152
158
|
- !ruby/object:Gem::Version
|
|
153
|
-
version: 2.0.
|
|
159
|
+
version: 2.0.4
|
|
154
160
|
type: :runtime
|
|
155
161
|
prerelease: false
|
|
156
162
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -160,7 +166,7 @@ dependencies:
|
|
|
160
166
|
version: '2.0'
|
|
161
167
|
- - ">="
|
|
162
168
|
- !ruby/object:Gem::Version
|
|
163
|
-
version: 2.0.
|
|
169
|
+
version: 2.0.4
|
|
164
170
|
- !ruby/object:Gem::Dependency
|
|
165
171
|
name: version_gem
|
|
166
172
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -255,14 +261,14 @@ dependencies:
|
|
|
255
261
|
requirements:
|
|
256
262
|
- - "~>"
|
|
257
263
|
- !ruby/object:Gem::Version
|
|
258
|
-
version: 0.9.
|
|
264
|
+
version: 0.9.3
|
|
259
265
|
type: :development
|
|
260
266
|
prerelease: false
|
|
261
267
|
version_requirements: !ruby/object:Gem::Requirement
|
|
262
268
|
requirements:
|
|
263
269
|
- - "~>"
|
|
264
270
|
- !ruby/object:Gem::Version
|
|
265
|
-
version: 0.9.
|
|
271
|
+
version: 0.9.3
|
|
266
272
|
- !ruby/object:Gem::Dependency
|
|
267
273
|
name: rake
|
|
268
274
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -448,6 +454,7 @@ files:
|
|
|
448
454
|
- THREAT_MODEL.md
|
|
449
455
|
- lib/oauth2.rb
|
|
450
456
|
- lib/oauth2/access_token.rb
|
|
457
|
+
- lib/oauth2/auth_sanitizer.rb
|
|
451
458
|
- lib/oauth2/authenticator.rb
|
|
452
459
|
- lib/oauth2/client.rb
|
|
453
460
|
- lib/oauth2/error.rb
|
|
@@ -476,10 +483,10 @@ licenses:
|
|
|
476
483
|
- MIT
|
|
477
484
|
metadata:
|
|
478
485
|
homepage_uri: https://oauth2.galtzo.com/
|
|
479
|
-
source_code_uri: https://github.com/ruby-oauth/oauth2/tree/v2.0.
|
|
480
|
-
changelog_uri: https://github.com/ruby-oauth/oauth2/blob/v2.0.
|
|
486
|
+
source_code_uri: https://github.com/ruby-oauth/oauth2/tree/v2.0.20
|
|
487
|
+
changelog_uri: https://github.com/ruby-oauth/oauth2/blob/v2.0.20/CHANGELOG.md
|
|
481
488
|
bug_tracker_uri: https://github.com/ruby-oauth/oauth2/issues
|
|
482
|
-
documentation_uri: https://www.rubydoc.info/gems/oauth2/2.0.
|
|
489
|
+
documentation_uri: https://www.rubydoc.info/gems/oauth2/2.0.20
|
|
483
490
|
mailing_list_uri: https://groups.google.com/g/oauth-ruby
|
|
484
491
|
funding_uri: https://github.com/sponsors/pboling
|
|
485
492
|
wiki_uri: https://gitlab.com/ruby-oauth/oauth2/-/wiki
|
|
@@ -488,11 +495,11 @@ metadata:
|
|
|
488
495
|
rubygems_mfa_required: 'true'
|
|
489
496
|
post_install_message: |2
|
|
490
497
|
|
|
491
|
-
---+++--- oauth2 v2.0.
|
|
498
|
+
---+++--- oauth2 v2.0.20 ---+++---
|
|
492
499
|
|
|
493
500
|
(minor) ⚠️ BREAKING CHANGES ⚠️ when upgrading from < v2
|
|
494
501
|
• Summary of breaking changes: https://gitlab.com/ruby-oauth/oauth2#what-is-new-for-v20
|
|
495
|
-
• Changes in this patch: https://gitlab.com/ruby-oauth/oauth2/-/blob/v2.0.
|
|
502
|
+
• Changes in this patch: https://gitlab.com/ruby-oauth/oauth2/-/blob/v2.0.20/CHANGELOG.md#2015-2025-09-08
|
|
496
503
|
|
|
497
504
|
News:
|
|
498
505
|
1. New documentation website, including for OAuth 2.1 and OIDC: https://oauth2.galtzo.com
|
metadata.gz.sig
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
���
|
|
1
|
+
+�
|
|
2
|
+
��n���KD<]��Q�b.Im=P!˝�xݹ$�+�p9iإ!2�%9O��Z�>w��m���5�o,ĪNX�)� ���B��`��l��n�R{�W�G�?kT�@�t!��\k�k'��K���^�sy����:���G�QyeR�� 2��9,��t�"��f<�ؿ;'kzΙl��ީr(��?͢���L�U����/ZC����Gkߴ1!��B��Xq*�{�wa~Ht��ȍ�f��7X��-"������"Ѩ��FN��u�ps��B(#!2�"CR�/u���M�������.�r�=��HH���H,b�7�q��R�`�n���a=+b
|
|
3
|
+
2Dkաn�
|
|
4
|
+
Վ
|