oauth2 2.0.10 → 2.0.18

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.
data/CITATION.cff ADDED
@@ -0,0 +1,20 @@
1
+ cff-version: 1.2.0
2
+ title: oauth2
3
+ message: >-
4
+ If you use this work and you want to cite it,
5
+ then you can use the metadata from this file.
6
+ type: software
7
+ authors:
8
+ - given-names: Peter Hurn
9
+ family-names: Boling
10
+ email: peter@railsbling.com
11
+ affiliation: railsbling.com
12
+ orcid: 'https://orcid.org/0009-0008-8519-441X'
13
+ identifiers:
14
+ - type: url
15
+ value: 'https://github.com/ruby-oauth/oauth2'
16
+ description: oauth2
17
+ repository-code: 'https://github.com/ruby-oauth/oauth2'
18
+ abstract: >-
19
+ oauth2
20
+ license: See license file
data/CODE_OF_CONDUCT.md CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  # Contributor Covenant Code of Conduct
3
2
 
4
3
  ## Our Pledge
@@ -7,8 +6,8 @@ We as members, contributors, and leaders pledge to make participation in our
7
6
  community a harassment-free experience for everyone, regardless of age, body
8
7
  size, visible or invisible disability, ethnicity, sex characteristics, gender
9
8
  identity and expression, level of experience, education, socio-economic status,
10
- nationality, personal appearance, race, religion, or sexual identity
11
- and orientation.
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
12
11
 
13
12
  We pledge to act and interact in ways that contribute to an open, welcoming,
14
13
  diverse, inclusive, and healthy community.
@@ -23,17 +22,17 @@ community include:
23
22
  * Giving and gracefully accepting constructive feedback
24
23
  * Accepting responsibility and apologizing to those affected by our mistakes,
25
24
  and learning from the experience
26
- * Focusing on what is best not just for us as individuals, but for the
27
- overall community
25
+ * Focusing on what is best not just for us as individuals, but for the overall
26
+ community
28
27
 
29
28
  Examples of unacceptable behavior include:
30
29
 
31
- * The use of sexualized language or imagery, and sexual attention or
32
- advances of any kind
30
+ * The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
33
32
  * Trolling, insulting or derogatory comments, and personal or political attacks
34
33
  * Public or private harassment
35
- * Publishing others' private information, such as a physical or email
36
- address, without their explicit permission
34
+ * Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
37
36
  * Other conduct which could reasonably be considered inappropriate in a
38
37
  professional setting
39
38
 
@@ -53,7 +52,7 @@ decisions when appropriate.
53
52
 
54
53
  This Code of Conduct applies within all community spaces, and also applies when
55
54
  an individual is officially representing the community in public spaces.
56
- Examples of representing our community include using an official e-mail address,
55
+ Examples of representing our community include using an official email address,
57
56
  posting via an official social media account, or acting as an appointed
58
57
  representative at an online or offline event.
59
58
 
@@ -61,7 +60,7 @@ representative at an online or offline event.
61
60
 
62
61
  Instances of abusive, harassing, or otherwise unacceptable behavior may be
63
62
  reported to the community leaders responsible for enforcement at
64
- [INSERT CONTACT METHOD].
63
+ [![Contact Maintainer][🚂maint-contact-img]][🚂maint-contact].
65
64
  All complaints will be reviewed and investigated promptly and fairly.
66
65
 
67
66
  All community leaders are obligated to respect the privacy and security of the
@@ -83,15 +82,15 @@ behavior was inappropriate. A public apology may be requested.
83
82
 
84
83
  ### 2. Warning
85
84
 
86
- **Community Impact**: A violation through a single incident or series
87
- of actions.
85
+ **Community Impact**: A violation through a single incident or series of
86
+ actions.
88
87
 
89
88
  **Consequence**: A warning with consequences for continued behavior. No
90
89
  interaction with the people involved, including unsolicited interaction with
91
90
  those enforcing the Code of Conduct, for a specified period of time. This
92
91
  includes avoiding interactions in community spaces as well as external channels
93
- like social media. Violating these terms may lead to a temporary or
94
- permanent ban.
92
+ like social media. Violating these terms may lead to a temporary or permanent
93
+ ban.
95
94
 
96
95
  ### 3. Temporary Ban
97
96
 
@@ -107,27 +106,29 @@ Violating these terms may lead to a permanent ban.
107
106
  ### 4. Permanent Ban
108
107
 
109
108
  **Community Impact**: Demonstrating a pattern of violation of community
110
- standards, including sustained inappropriate behavior, harassment of an
109
+ standards, including sustained inappropriate behavior, harassment of an
111
110
  individual, or aggression toward or disparagement of classes of individuals.
112
111
 
113
- **Consequence**: A permanent ban from any sort of public interaction within
114
- the community.
112
+ **Consequence**: A permanent ban from any sort of public interaction within the
113
+ community.
115
114
 
116
115
  ## Attribution
117
116
 
118
117
  This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119
- version 2.0, available at
120
- [https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
118
+ version 2.1, available at
119
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
121
120
 
122
121
  Community Impact Guidelines were inspired by
123
122
  [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124
123
 
125
124
  For answers to common questions about this code of conduct, see the FAQ at
126
- [https://www.contributor-covenant.org/faq][FAQ]. Translations are available
127
- at [https://www.contributor-covenant.org/translations][translations].
125
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126
+ [https://www.contributor-covenant.org/translations][translations].
128
127
 
129
128
  [homepage]: https://www.contributor-covenant.org
130
- [v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
129
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
131
130
  [Mozilla CoC]: https://github.com/mozilla/diversity
132
131
  [FAQ]: https://www.contributor-covenant.org/faq
133
132
  [translations]: https://www.contributor-covenant.org/translations
133
+ [🚂maint-contact]: http://www.railsbling.com/contact
134
+ [🚂maint-contact-img]: https://img.shields.io/badge/Contact-Maintainer-0093D0.svg?style=flat&logo=rubyonrails&logoColor=red
data/CONTRIBUTING.md CHANGED
@@ -1,44 +1,95 @@
1
- ## Contributing
1
+ # Contributing
2
2
 
3
- Bug reports and pull requests are welcome on GitLab at [https://gitlab.com/oauth-xx/oauth2][🚎src-main]
4
- . This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to
3
+ Bug reports and pull requests are welcome on [CodeBerg][📜src-cb], [GitLab][📜src-gl], or [GitHub][📜src-gh].
4
+ This project should be a safe, welcoming space for collaboration, so contributors agree to adhere to
5
5
  the [code of conduct][🤝conduct].
6
6
 
7
- To submit a patch, please fork the project and create a patch with tests.
8
- Once you're happy with it send a pull request.
7
+ To submit a patch, please fork the project, create a patch with tests, and send a pull request.
9
8
 
10
- We [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] so if you make changes, remember to update it.
9
+ Remember to [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] if you make changes.
11
10
 
12
- ## You can help!
11
+ ## Help out!
13
12
 
14
13
  Take a look at the `reek` list which is the file called `REEK` and find something to improve.
15
14
 
16
- Simply follow these instructions:
15
+ Follow these instructions:
17
16
 
18
17
  1. Fork the repository
19
- 2. Create your feature branch (`git checkout -b my-new-feature`)
18
+ 2. Create a feature branch (`git checkout -b my-new-feature`)
20
19
  3. Make some fixes.
21
- 4. Commit your changes (`git commit -am 'Added some feature'`)
20
+ 4. Commit changes (`git commit -am 'Added some feature'`)
22
21
  5. Push to the branch (`git push origin my-new-feature`)
23
22
  6. Make sure to add tests for it. This is important, so it doesn't break in a future release.
24
23
  7. Create new Pull Request.
25
24
 
26
- ## Appraisals
25
+ ## Executables vs Rake tasks
27
26
 
28
- From time to time the appraisal gemfiles in `gemfiles/` will need to be updated.
29
- They are created and updated with the commands:
27
+ Executables shipped by dependencies, such as kettle-dev, and stone_checksums, are available
28
+ after running `bin/setup`. These include:
30
29
 
31
- NOTE: We run on a [fork][🚎appraisal-fork] of Appraisal.
30
+ - gem_checksums
31
+ - kettle-changelog
32
+ - kettle-commit-msg
33
+ - kettle-dev-setup
34
+ - kettle-dvcs
35
+ - kettle-pre-release
36
+ - kettle-readme-backers
37
+ - kettle-release
32
38
 
33
- Please upvote the PR for `eval_gemfile` [support][🚎appraisal-eval-gemfile-pr]
39
+ There are many Rake tasks available as well. You can see them by running:
34
40
 
35
41
  ```shell
36
- BUNDLE_GEMFILE=Appraisal.root.gemfile bundle
37
- BUNDLE_GEMFILE=Appraisal.root.gemfile bundle exec appraisal update
38
- bundle exec rake rubocop_gradual:autocorrect
42
+ bin/rake -T
43
+ ```
44
+
45
+ ## Environment Variables for Local Development
46
+
47
+ Below are the primary environment variables recognized by stone_checksums (and its integrated tools). Unless otherwise noted, set boolean values to the string "true" to enable.
48
+
49
+ General/runtime
50
+ - DEBUG: Enable extra internal logging for this library (default: false)
51
+ - REQUIRE_BENCH: Enable `require_bench` to profile requires (default: false)
52
+ - CI: When set to true, adjusts default rake tasks toward CI behavior
53
+
54
+ Coverage (kettle-soup-cover / SimpleCov)
55
+ - K_SOUP_COV_DO: Enable coverage collection (default: true in .envrc)
56
+ - K_SOUP_COV_FORMATTERS: Comma-separated list of formatters (html, xml, rcov, lcov, json, tty)
57
+ - K_SOUP_COV_MIN_LINE: Minimum line coverage threshold (integer, e.g., 100)
58
+ - K_SOUP_COV_MIN_BRANCH: Minimum branch coverage threshold (integer, e.g., 100)
59
+ - K_SOUP_COV_MIN_HARD: Fail the run if thresholds are not met (true/false)
60
+ - K_SOUP_COV_MULTI_FORMATTERS: Enable multiple formatters at once (true/false)
61
+ - K_SOUP_COV_OPEN_BIN: Path to browser opener for HTML (empty disables auto-open)
62
+ - MAX_ROWS: Limit console output rows for simplecov-console (e.g., 1)
63
+ Tip: When running a single spec file locally, you may want `K_SOUP_COV_MIN_HARD=false` to avoid failing thresholds for a partial run.
64
+
65
+ GitHub API and CI helpers
66
+ - GITHUB_TOKEN or GH_TOKEN: Token used by `ci:act` and release workflow checks to query GitHub Actions status at higher rate limits
67
+
68
+ Releasing and signing
69
+ - SKIP_GEM_SIGNING: If set, skip gem signing during build/release
70
+ - GEM_CERT_USER: Username for selecting your public cert in `certs/<USER>.pem` (defaults to $USER)
71
+ - SOURCE_DATE_EPOCH: Reproducible build timestamp.
72
+ - `kettle-release` will set this automatically for the session.
73
+ - Not needed on bundler >= 2.7.0, as reproducible builds have become the default.
74
+
75
+ Git hooks and commit message helpers (exe/kettle-commit-msg)
76
+ - GIT_HOOK_BRANCH_VALIDATE: Branch name validation mode (e.g., `jira`) or `false` to disable
77
+ - GIT_HOOK_FOOTER_APPEND: Append a footer to commit messages when goalie allows (true/false)
78
+ - GIT_HOOK_FOOTER_SENTINEL: Required when footer append is enabled — a unique first-line sentinel to prevent duplicates
79
+ - GIT_HOOK_FOOTER_APPEND_DEBUG: Extra debug output in the footer template (true/false)
80
+
81
+ For a quick starting point, this repository’s `.envrc` shows sane defaults, and `.env.local` can override them locally.
82
+
83
+ ## Appraisals
84
+
85
+ From time to time the [appraisal2][🚎appraisal2] gemfiles in `gemfiles/` will need to be updated.
86
+ They are created and updated with the commands:
87
+
88
+ ```console
89
+ bin/rake appraisal:update
39
90
  ```
40
91
 
41
- When adding an appraisal to CI check the [runner tool cache][🏃‍♂️runner-tool-cache] to see which runner to use.
92
+ When adding an appraisal to CI, check the [runner tool cache][🏃‍♂️runner-tool-cache] to see which runner to use.
42
93
 
43
94
  ## The Reek List
44
95
 
@@ -46,7 +97,7 @@ Take a look at the `reek` list which is the file called `REEK` and find somethin
46
97
 
47
98
  To refresh the `reek` list:
48
99
 
49
- ```bash
100
+ ```console
50
101
  bundle exec reek > REEK
51
102
  ```
52
103
 
@@ -54,24 +105,42 @@ bundle exec reek > REEK
54
105
 
55
106
  To run all tests
56
107
 
57
- ```bash
108
+ ```console
58
109
  bundle exec rake test
59
110
  ```
60
111
 
112
+ ### Spec organization (required)
113
+
114
+ - One spec file per class/module. For each class or module under `lib/`, keep all of its unit tests in a single spec file under `spec/` that mirrors the path and file name exactly: `lib/oauth2/my_class.rb` -> `spec/oauth2/my_class_spec.rb`.
115
+ - Exception: Integration specs that intentionally span multiple classes. Place these under `spec/integration/` (or a clearly named integration folder), and do not directly mirror a single class. Name them after the scenario, not a class.
116
+
61
117
  ## Lint It
62
118
 
63
119
  Run all the default tasks, which includes running the gradually autocorrecting linter, `rubocop-gradual`.
64
120
 
65
- ```bash
121
+ ```console
66
122
  bundle exec rake
67
123
  ```
68
124
 
69
125
  Or just run the linter.
70
126
 
71
- ```bash
127
+ ```console
72
128
  bundle exec rake rubocop_gradual:autocorrect
73
129
  ```
74
130
 
131
+ For more detailed information about using RuboCop in this project, please see the [RUBOCOP.md](RUBOCOP.md) guide. This project uses `rubocop_gradual` instead of vanilla RuboCop, which requires specific commands for checking violations.
132
+
133
+ ### Important: Do not add inline RuboCop disables
134
+
135
+ Never add `# rubocop:disable ...` / `# rubocop:enable ...` comments to code or specs (except when following the few existing `rubocop:disable` patterns for a rule already being disabled elsewhere in the code). Instead:
136
+
137
+ - Prefer configuration-based exclusions when a rule should not apply to certain paths or files (e.g., via `.rubocop.yml`).
138
+ - When a violation is temporary, and you plan to fix it later, record it in `.rubocop_gradual.lock` using the gradual workflow:
139
+ - `bundle exec rake rubocop_gradual:autocorrect` (preferred)
140
+ - `bundle exec rake rubocop_gradual:force_update` (only when you cannot fix the violations immediately)
141
+
142
+ As a general rule, fix style issues rather than ignoring them. For example, our specs should follow RSpec conventions like using `described_class` for the class under test.
143
+
75
144
  ## Contributors
76
145
 
77
146
  Your picture could be here!
@@ -80,60 +149,73 @@ Your picture could be here!
80
149
 
81
150
  Made with [contributors-img][🖐contrib-rocks].
82
151
 
83
- Also see GitLab Contributors: [https://gitlab.com/oauth-xx/oauth2/-/graphs/main][🚎contributors-gl]
152
+ Also see GitLab Contributors: [https://gitlab.com/ruby-oauth/oauth2/-/graphs/main][🚎contributors-gl]
84
153
 
85
154
  ## For Maintainers
86
155
 
87
156
  ### One-time, Per-maintainer, Setup
88
157
 
89
- **IMPORTANT**: If you want to sign the build you create,
90
- your public key for signing gems will need to be picked up by the line in the
158
+ **IMPORTANT**: To sign a build,
159
+ a public key for signing gems will need to be picked up by the line in the
91
160
  `gemspec` defining the `spec.cert_chain` (check the relevant ENV variables there).
92
- All releases to RubyGems.org will be signed.
161
+ All releases are signed releases.
93
162
  See: [RubyGems Security Guide][🔒️rubygems-security-guide]
94
163
 
95
- NOTE: To build without signing the gem you must set `SKIP_GEM_SIGNING` to some value in your environment.
164
+ NOTE: To build without signing the gem set `SKIP_GEM_SIGNING` to any value in the environment.
96
165
 
97
166
  ### To release a new version:
98
167
 
99
- 1. Run `bin/setup && bin/rake` as a tests, coverage, & linting sanity check
168
+ #### Automated process
169
+
170
+ 1. Update version.rb to contain the correct version-to-be-released.
171
+ 2. Run `bundle exec kettle-changelog`.
172
+ 3. Run `bundle exec kettle-release`.
173
+ 4. Stay awake and monitor the release process for any errors, and answer any prompts.
174
+
175
+ #### Manual process
176
+
177
+ 1. Run `bin/setup && bin/rake` as a "test, coverage, & linting" sanity check
100
178
  2. Update the version number in `version.rb`, and ensure `CHANGELOG.md` reflects changes
101
179
  3. Run `bin/setup && bin/rake` again as a secondary check, and to update `Gemfile.lock`
102
180
  4. Run `git commit -am "🔖 Prepare release v<VERSION>"` to commit the changes
103
- 5. Run `git push` to trigger the final CI pipeline before release, & merge PRs
104
- - NOTE: Remember to [check the build][🧪build]!
181
+ 5. Run `git push` to trigger the final CI pipeline before release, and merge PRs
182
+ - NOTE: Remember to [check the build][🧪build].
105
183
  6. Run `export GIT_TRUNK_BRANCH_NAME="$(git remote show origin | grep 'HEAD branch' | cut -d ' ' -f5)" && echo $GIT_TRUNK_BRANCH_NAME`
106
184
  7. Run `git checkout $GIT_TRUNK_BRANCH_NAME`
107
- 8. Run `git pull origin $GIT_TRUNK_BRANCH_NAME` to ensure you will release the latest trunk code
108
- 9. Set `SOURCE_DATE_EPOCH` so `rake build` and `rake release` use same timestamp, and generate same checksums
185
+ 8. Run `git pull origin $GIT_TRUNK_BRANCH_NAME` to ensure latest trunk code
186
+ 9. Optional for older Bundler (< 2.7.0): Set `SOURCE_DATE_EPOCH` so `rake build` and `rake release` use the same timestamp and generate the same checksums
187
+ - If your Bundler is >= 2.7.0, you can skip this; builds are reproducible by default.
109
188
  - Run `export SOURCE_DATE_EPOCH=$EPOCHSECONDS && echo $SOURCE_DATE_EPOCH`
110
189
  - If the echo above has no output, then it didn't work.
111
- - Note that you'll need the `zsh/datetime` module, if running `zsh`.
190
+ - Note: `zsh/datetime` module is needed, if running `zsh`.
112
191
  - In older versions of `bash` you can use `date +%s` instead, i.e. `export SOURCE_DATE_EPOCH=$(date +%s) && echo $SOURCE_DATE_EPOCH`
113
192
  10. Run `bundle exec rake build`
114
193
  11. Run `bin/gem_checksums` (more context [1][🔒️rubygems-checksums-pr], [2][🔒️rubygems-guides-pr])
115
194
  to create SHA-256 and SHA-512 checksums. This functionality is provided by the `stone_checksums`
116
195
  [gem][💎stone_checksums].
117
- - Checksums will be committed automatically by the script, but not pushed
118
- 12. Run `bundle exec rake release` which will create a git tag for the version,
119
- push git commits and tags, and push the `.gem` file to [rubygems.org][💎rubygems]
120
-
121
- [🚎src-main]: https://gitlab.com/oauth-xx/oauth2
122
- [🧪build]: https://github.com/oauth-xx/oauth2/actions
123
- [🤝conduct]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CODE_OF_CONDUCT.md
196
+ - The script automatically commits but does not push the checksums
197
+ 12. Sanity check the SHA256, comparing with the output from the `bin/gem_checksums` command:
198
+ - `sha256sum pkg/<gem name>-<version>.gem`
199
+ 13. Run `bundle exec rake release` which will create a git tag for the version,
200
+ push git commits and tags, and push the `.gem` file to the gem host configured in the gemspec.
201
+
202
+ [📜src-gl]: https://gitlab.com/ruby-oauth/oauth2/
203
+ [📜src-cb]: https://codeberg.org/ruby-oauth/oauth2
204
+ [📜src-gh]: https://github.com/ruby-oauth/oauth2
205
+ [🧪build]: https://github.com/ruby-oauth/oauth2/actions
206
+ [🤝conduct]: https://gitlab.com/ruby-oauth/oauth2/-/blob/main/CODE_OF_CONDUCT.md
124
207
  [🖐contrib-rocks]: https://contrib.rocks
125
- [🖐contributors]: https://github.com/oauth-xx/oauth2/graphs/contributors
126
- [🚎contributors-gl]: https://gitlab.com/oauth-xx/oauth2/-/graphs/main
127
- [🖐contributors-img]: https://contrib.rocks/image?repo=oauth-xx/oauth2
128
- [💎rubygems]: https://rubygems.org
208
+ [🖐contributors]: https://github.com/ruby-oauth/oauth2/graphs/contributors
209
+ [🚎contributors-gl]: https://gitlab.com/ruby-oauth/oauth2/-/graphs/main
210
+ [🖐contributors-img]: https://contrib.rocks/image?repo=ruby-oauth/oauth2
211
+ [💎gem-coop]: https://gem.coop
129
212
  [🔒️rubygems-security-guide]: https://guides.rubygems.org/security/#building-gems
130
213
  [🔒️rubygems-checksums-pr]: https://github.com/rubygems/rubygems/pull/6022
131
214
  [🔒️rubygems-guides-pr]: https://github.com/rubygems/guides/pull/325
132
- [💎stone_checksums]: https://github.com/pboling/stone_checksums
215
+ [💎stone_checksums]: https://github.com/galtzo-floss/stone_checksums
133
216
  [📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
134
217
  [📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-FFDD67.svg?style=flat
135
218
  [📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139
136
219
  [📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
137
- [🚎appraisal-eval-gemfile-pr]: https://github.com/thoughtbot/appraisal/pull/248
138
- [🚎appraisal-fork]: https://github.com/pboling/appraisal/tree/galtzo
220
+ [🚎appraisal2]: https://github.com/appraisal-rb/appraisal2
139
221
  [🏃‍♂️runner-tool-cache]: https://github.com/ruby/ruby-builder/releases/tag/toolcache
data/FUNDING.md ADDED
@@ -0,0 +1,74 @@
1
+ <!-- RELEASE-NOTES-FOOTER-START -->
2
+
3
+ Official Discord 👉️ [![Live Chat on Discord][✉️discord-invite-img]][✉️discord-invite]
4
+
5
+ Many paths lead to being a sponsor or a backer of this project. Are you on such a path?
6
+
7
+ [![OpenCollective Backers][🖇osc-backers-i]][🖇osc-backers] [![OpenCollective Sponsors][🖇osc-sponsors-i]][🖇osc-sponsors] [![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor] [![Liberapay Goal Progress][⛳liberapay-img]][⛳liberapay] [![Donate on PayPal][🖇paypal-img]][🖇paypal]
8
+
9
+ [![Buy me a coffee][🖇buyme-small-img]][🖇buyme] [![Donate on Polar][🖇polar-img]][🖇polar] [![Donate to my FLOSS efforts at ko-fi.com][🖇kofi-img]][🖇kofi] [![Donate to my FLOSS efforts using Patreon][🖇patreon-img]][🖇patreon]
10
+
11
+ [⛳liberapay-img]: https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay&color=a51611&style=flat
12
+ [⛳liberapay]: https://liberapay.com/pboling/donate
13
+ [🖇osc-backers]: https://opencollective.com/ruby-oauth#backer
14
+ [🖇osc-backers-i]: https://opencollective.com/ruby-oauth/backers/badge.svg?style=flat
15
+ [🖇osc-sponsors]: https://opencollective.com/ruby-oauth#sponsor
16
+ [🖇osc-sponsors-i]: https://opencollective.com/ruby-oauth/sponsors/badge.svg?style=flat
17
+ [🖇sponsor-img]: https://img.shields.io/badge/Sponsor_Me!-pboling.svg?style=social&logo=github
18
+ [🖇sponsor]: https://github.com/sponsors/pboling
19
+ [🖇polar-img]: https://img.shields.io/badge/polar-donate-a51611.svg?style=flat
20
+ [🖇polar]: https://polar.sh/pboling
21
+ [🖇kofi-img]: https://img.shields.io/badge/ko--fi-%E2%9C%93-a51611.svg?style=flat
22
+ [🖇kofi]: https://ko-fi.com/O5O86SNP4
23
+ [🖇patreon-img]: https://img.shields.io/badge/patreon-donate-a51611.svg?style=flat
24
+ [🖇patreon]: https://patreon.com/galtzo
25
+ [🖇buyme-small-img]: https://img.shields.io/badge/buy_me_a_coffee-%E2%9C%93-a51611.svg?style=flat
26
+ [🖇buyme]: https://www.buymeacoffee.com/pboling
27
+ [🖇paypal-img]: https://img.shields.io/badge/donate-paypal-a51611.svg?style=flat&logo=paypal
28
+ [🖇paypal]: https://www.paypal.com/paypalme/peterboling
29
+ [✉️discord-invite]: https://discord.gg/3qme4XHNKN
30
+ [✉️discord-invite-img]: https://img.shields.io/discord/1373797679469170758?style=flat
31
+
32
+ <!-- RELEASE-NOTES-FOOTER-END -->
33
+
34
+ # 🤑 A request for help
35
+
36
+ Maintainers have teeth and need to pay their dentists.
37
+ After getting laid off in an RIF in March, and encountering difficulty finding a new one,
38
+ I began spending most of my time building open source tools.
39
+ I'm hoping to be able to pay for my kids' health insurance this month,
40
+ so if you value the work I am doing, I need your support.
41
+ Please consider sponsoring me or the project.
42
+
43
+ To join the community or get help 👇️ Join the Discord.
44
+
45
+ [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite]
46
+
47
+ To say "thanks!" ☝️ Join the Discord or 👇️ send money.
48
+
49
+ [![Sponsor ruby-oauth/oauth2 on Open Source Collective][🖇osc-all-bottom-img]][🖇osc] 💌 [![Sponsor me on GitHub Sponsors][🖇sponsor-bottom-img]][🖇sponsor] 💌 [![Sponsor me on Liberapay][⛳liberapay-bottom-img]][⛳liberapay] 💌 [![Donate on PayPal][🖇paypal-bottom-img]][🖇paypal]
50
+
51
+ # Another Way to Support Open Source Software
52
+
53
+ I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈‍ cats).
54
+
55
+ If you work at a company that uses my work, please encourage them to support me as a corporate sponsor. My work on gems you use might show up in `bundle fund`.
56
+
57
+ I’m developing a new library, [floss_funding][🖇floss-funding-gem], designed to empower open-source developers like myself to get paid for the work we do, in a sustainable way. Please give it a look.
58
+
59
+ **[Floss-Funding.dev][🖇floss-funding.dev]: 👉️ No network calls. 👉️ No tracking. 👉️ No oversight. 👉️ Minimal crypto hashing. 💡 Easily disabled nags**
60
+
61
+ [⛳liberapay-bottom-img]: https://img.shields.io/liberapay/goal/pboling.svg?style=for-the-badge&logo=liberapay&color=a51611
62
+ [🖇osc-all-img]: https://img.shields.io/opencollective/all/ruby-oauth
63
+ [🖇osc-sponsors-img]: https://img.shields.io/opencollective/sponsors/ruby-oauth
64
+ [🖇osc-backers-img]: https://img.shields.io/opencollective/backers/ruby-oauth
65
+ [🖇osc-all-bottom-img]: https://img.shields.io/opencollective/all/ruby-oauth?style=for-the-badge
66
+ [🖇osc-sponsors-bottom-img]: https://img.shields.io/opencollective/sponsors/ruby-oauth?style=for-the-badge
67
+ [🖇osc-backers-bottom-img]: https://img.shields.io/opencollective/backers/ruby-oauth?style=for-the-badge
68
+ [🖇osc]: https://opencollective.com/ruby-oauth
69
+ [🖇sponsor-bottom-img]: https://img.shields.io/badge/Sponsor_Me!-pboling-blue?style=for-the-badge&logo=github
70
+ [🖇buyme-img]: https://img.buymeacoffee.com/button-api/?text=Buy%20me%20a%20latte&emoji=&slug=pboling&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff
71
+ [🖇paypal-bottom-img]: https://img.shields.io/badge/donate-paypal-a51611.svg?style=for-the-badge&logo=paypal&color=0A0A0A
72
+ [🖇floss-funding.dev]: https://floss-funding.dev
73
+ [🖇floss-funding-gem]: https://github.com/galtzo-floss/floss_funding
74
+ [✉️discord-invite-img-ftb]: https://img.shields.io/discord/1373797679469170758?style=for-the-badge
data/IRP.md ADDED
@@ -0,0 +1,107 @@
1
+ # Incident Response Plan (IRP)
2
+
3
+ Status: Draft
4
+
5
+ ## Purpose
6
+
7
+ This Incident Response Plan (IRP) defines the steps the project maintainer(s) will follow when handling security incidents related to the `oauth2` gem. It is written for a small project with a single primary maintainer and is intended to be practical, concise, and actionable.
8
+
9
+ ## Scope
10
+
11
+ Applies to security incidents that affect the `oauth2` codebase, releases (gems), CI/CD infrastructure related to building and publishing the gem, repository credentials, or any compromise of project infrastructure that could impact users.
12
+
13
+ ## Key assumptions
14
+ - This project is maintained primarily by a single maintainer.
15
+ - Public vulnerability disclosure is handled via Tidelift (see `SECURITY.md`).
16
+ - The maintainer will act as incident commander unless otherwise delegated.
17
+
18
+ ## Contact & Roles
19
+
20
+ - Incident Commander: Primary maintainer (repo owner). Responsible for coordinating triage, remediation, and communications.
21
+ - Secondary Contact: (optional) A trusted collaborator or organization contact if available.
22
+
23
+ ### If you are an external reporter
24
+ - Do not publicly disclose details of an active vulnerability before coordination via Tidelift.
25
+ - See `SECURITY.md` for Tidelift disclosure instructions. If the reporter has questions and cannot use Tidelift, they may open a direct encrypted report as described in `SECURITY.md` (if available) or email the maintainer contact listed in the repository.
26
+
27
+ ## Incident Handling Workflow (high level)
28
+ 1. Identification & Reporting
29
+ - Reports may arrive via Tidelift, issue tracker, direct email, or third-party advisories.
30
+ - Immediately acknowledge receipt (within 24-72 hours) via the reporting channel.
31
+
32
+ 2. Triage & Initial Assessment (first 72 hours)
33
+ - Confirm the report is not duplicative and gather: reproducer, affected versions, attack surface, exploitability, and CVSS-like severity estimate.
34
+ - Verify the issue against the codebase and reproduce locally if possible.
35
+ - Determine scope: which versions are affected, whether the issue is in code paths executed in common setups, and whether a workaround exists.
36
+
37
+ 3. Containment & Mitigation
38
+ - If a simple mitigation or workaround (configuration change, safe default, or recommended upgrade) exists, document it clearly in the issue/Tidelift advisory.
39
+ - If immediate removal of a release is required (rare), consult Tidelift for coordinated takedown and notify package hosts if applicable.
40
+
41
+ 4. Remediation & Patch
42
+ - Prepare a fix in a branch with tests and changelog entries. Prefer minimal, well-tested changes.
43
+ - Include tests that reproduce the faulty behavior and demonstrate the fix.
44
+ - Hardening: add fuzz tests, input validation, or additional checks as appropriate.
45
+
46
+ 5. Release & Disclosure
47
+ - Coordinate disclosure through Tidelift per `SECURITY.md` timelines. Aim for a coordinated disclosure and patch release to minimize risk to users.
48
+ - Publish a patch release (increment gem version) and an advisory via Tidelift.
49
+ - Update `CHANGELOG.md` and repository release notes with non-sensitive details.
50
+
51
+ 6. Post-Incident
52
+ - Produce a short postmortem: timeline, root cause, actions taken, and follow-ups.
53
+ - Add/adjust tests and CI checks to prevent regressions.
54
+ - If credentials or infrastructure were compromised, rotate secrets and audit access.
55
+
56
+ ## Severity classification (guidance)
57
+ - High/Critical: Remote code execution, data exfiltration, or any vulnerability that can be exploited without user interaction. Immediate action and prioritized patching.
58
+ - Medium: Privilege escalation, sensitive information leaks that require specific conditions. Patch in the next release cycle with advisory.
59
+ - Low: Minor information leaks, UI issues, or non-exploitable bugs. Fix normally and include in the next scheduled release.
60
+
61
+ ## Preservation of evidence
62
+ - Preserve all reporter-provided data, logs, and reproducer code in a secure location (local encrypted storage or private branch) for the investigation.
63
+ - Do not publish evidence that would enable exploitation before coordinated disclosure.
64
+
65
+ ## Communication templates
66
+ Acknowledgement (to reporter)
67
+
68
+ "Thank you for reporting this issue. I've received your report and will triage it within 72 hours. If you can, please provide reproduction steps, affected versions, and any exploit PoC. I will coordinate disclosure through Tidelift per the project's security policy."
69
+
70
+ Public advisory (after patch is ready)
71
+
72
+ "A security advisory for oauth2 (versions X.Y.Z) has been published via Tidelift. Please upgrade to version A.B.C which patches [brief description]. See the advisory for details and recommended mitigations."
73
+
74
+ ## Runbook: Quick steps for a maintainer to patch and release
75
+ 1. Create a branch: `git checkout -b fix/security-brief-description`
76
+ 2. Reproduce the issue locally and add a regression spec in `spec/`.
77
+ 3. Implement the fix and run the test suite: `bundle exec rspec` (or the project's preferred test command).
78
+ 4. Bump version in `lib/oauth2/version.rb` following semantic versioning.
79
+ 5. Update `CHANGELOG.md` with an entry describing the fix (avoid exploit details).
80
+ 6. Commit and push the branch, open a PR, and merge after approvals.
81
+ 7. Build and push the gem: `gem build oauth2.gemspec && gem push pkg/...` (coordinate with Tidelift before public push if disclosure is coordinated).
82
+ 8. Publish a release on GitHub and ensure the Tidelift advisory is posted.
83
+
84
+ ## Operational notes
85
+ - Secrets: Use local encrypted storage for any sensitive reporter data. If repository or CI secrets may be compromised, rotate them immediately and update dependent services.
86
+ - Access control: Limit who can publish gems and who has admin access to the repo. Keep an up-to-date list of collaborators in a secure place.
87
+
88
+ ## Legal & regulatory
89
+ - If the incident involves user data or has legal implications, consult legal counsel or the maintainers' employer as appropriate. The maintainer should document the timeline and all communications.
90
+
91
+ ## Retrospective & continuous improvement
92
+ After an incident, perform a brief post-incident review covering:
93
+ - What happened and why
94
+ - What was done to contain and remediate
95
+ - What tests or process changes will prevent recurrence
96
+ - Assign owners and deadlines for follow-up tasks
97
+
98
+ ## References
99
+ - See `SECURITY.md` for the project's official disclosure channel (Tidelift).
100
+
101
+ ## Appendix: Example checklist for an incident
102
+ - [ ] Acknowledge report to reporter (24-72 hours)
103
+ - [ ] Reproduce and classify severity
104
+ - [ ] Prepare and test a fix in a branch
105
+ - [ ] Coordinate disclosure via Tidelift
106
+ - [ ] Publish patch release and advisory
107
+ - [ ] Postmortem and follow-up actions
data/LICENSE.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2011 - 2013 Michael Bleigh and Intridea, Inc.
4
- Copyright (c) 2017 - 2025 Peter H. Boling, of RailsBling.com, and OAuth2 contributors
3
+ Copyright (c) 2017-2025 Peter H. Boling, of Galtzo.com, and oauth2 contributors
4
+ Copyright (c) 2011-2013 Michael Bleigh and Intridea, Inc.
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  of this software and associated documentation files (the "Software"), to deal