oauth2 2.0.9 → 2.0.10
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 +301 -168
- data/CODE_OF_CONDUCT.md +0 -0
- data/CONTRIBUTING.md +126 -31
- data/{LICENSE → LICENSE.txt} +1 -1
- data/README.md +619 -245
- data/SECURITY.md +2 -2
- data/lib/oauth2/access_token.rb +186 -32
- data/lib/oauth2/authenticator.rb +9 -6
- data/lib/oauth2/client.rb +291 -96
- data/lib/oauth2/error.rb +14 -14
- data/lib/oauth2/filtered_attributes.rb +31 -0
- data/lib/oauth2/response.rb +17 -13
- data/lib/oauth2/strategy/assertion.rb +4 -4
- data/lib/oauth2/strategy/auth_code.rb +3 -3
- data/lib/oauth2/strategy/base.rb +0 -0
- data/lib/oauth2/strategy/client_credentials.rb +2 -2
- data/lib/oauth2/strategy/implicit.rb +3 -3
- data/lib/oauth2/strategy/password.rb +6 -4
- data/lib/oauth2/version.rb +1 -1
- data/lib/oauth2.rb +23 -18
- data.tar.gz.sig +0 -0
- metadata +188 -67
- metadata.gz.sig +0 -0
data/CODE_OF_CONDUCT.md
CHANGED
File without changes
|
data/CONTRIBUTING.md
CHANGED
@@ -1,44 +1,139 @@
|
|
1
1
|
## Contributing
|
2
2
|
|
3
|
-
Bug reports and pull requests are welcome on GitLab at [https://gitlab.com/oauth-xx/oauth2][
|
3
|
+
Bug reports and pull requests are welcome on GitLab at [https://gitlab.com/oauth-xx/oauth2][🚎src-main]
|
4
4
|
. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to
|
5
|
-
the [code of conduct][conduct].
|
6
|
-
|
7
|
-
To submit a patch, please fork the project and create a patch with tests.
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
5
|
+
the [code of conduct][🤝conduct].
|
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.
|
9
|
+
|
10
|
+
We [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] so if you make changes, remember to update it.
|
11
|
+
|
12
|
+
## You can help!
|
13
|
+
|
14
|
+
Take a look at the `reek` list which is the file called `REEK` and find something to improve.
|
15
|
+
|
16
|
+
Simply follow these instructions:
|
17
|
+
|
18
|
+
1. Fork the repository
|
19
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
20
|
+
3. Make some fixes.
|
21
|
+
4. Commit your changes (`git commit -am 'Added some feature'`)
|
22
|
+
5. Push to the branch (`git push origin my-new-feature`)
|
23
|
+
6. Make sure to add tests for it. This is important, so it doesn't break in a future release.
|
24
|
+
7. Create new Pull Request.
|
25
|
+
|
26
|
+
## Appraisals
|
27
|
+
|
28
|
+
From time to time the appraisal gemfiles in `gemfiles/` will need to be updated.
|
29
|
+
They are created and updated with the commands:
|
30
|
+
|
31
|
+
NOTE: We run on a [fork][🚎appraisal-fork] of Appraisal.
|
32
|
+
|
33
|
+
Please upvote the PR for `eval_gemfile` [support][🚎appraisal-eval-gemfile-pr]
|
34
|
+
|
35
|
+
```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
|
39
|
+
```
|
40
|
+
|
41
|
+
When adding an appraisal to CI check the [runner tool cache][🏃♂️runner-tool-cache] to see which runner to use.
|
42
|
+
|
43
|
+
## The Reek List
|
44
|
+
|
45
|
+
Take a look at the `reek` list which is the file called `REEK` and find something to improve.
|
46
|
+
|
47
|
+
To refresh the `reek` list:
|
48
|
+
|
49
|
+
```bash
|
50
|
+
bundle exec reek > REEK
|
51
|
+
```
|
52
|
+
|
53
|
+
## Run Tests
|
54
|
+
|
55
|
+
To run all tests
|
56
|
+
|
57
|
+
```bash
|
58
|
+
bundle exec rake test
|
59
|
+
```
|
60
|
+
|
61
|
+
## Lint It
|
62
|
+
|
63
|
+
Run all the default tasks, which includes running the gradually autocorrecting linter, `rubocop-gradual`.
|
64
|
+
|
65
|
+
```bash
|
66
|
+
bundle exec rake
|
67
|
+
```
|
68
|
+
|
69
|
+
Or just run the linter.
|
70
|
+
|
71
|
+
```bash
|
72
|
+
bundle exec rake rubocop_gradual:autocorrect
|
73
|
+
```
|
27
74
|
|
28
75
|
## Contributors
|
29
76
|
|
30
|
-
|
77
|
+
Your picture could be here!
|
78
|
+
|
79
|
+
[![Contributors][🖐contributors-img]][🖐contributors]
|
80
|
+
|
81
|
+
Made with [contributors-img][🖐contrib-rocks].
|
82
|
+
|
83
|
+
Also see GitLab Contributors: [https://gitlab.com/oauth-xx/oauth2/-/graphs/main][🚎contributors-gl]
|
31
84
|
|
32
|
-
|
85
|
+
## For Maintainers
|
33
86
|
|
34
|
-
|
87
|
+
### One-time, Per-maintainer, Setup
|
35
88
|
|
36
|
-
|
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
|
91
|
+
`gemspec` defining the `spec.cert_chain` (check the relevant ENV variables there).
|
92
|
+
All releases to RubyGems.org will be signed.
|
93
|
+
See: [RubyGems Security Guide][🔒️rubygems-security-guide]
|
37
94
|
|
38
|
-
|
95
|
+
NOTE: To build without signing the gem you must set `SKIP_GEM_SIGNING` to some value in your environment.
|
39
96
|
|
40
|
-
|
97
|
+
### To release a new version:
|
41
98
|
|
42
|
-
|
99
|
+
1. Run `bin/setup && bin/rake` as a tests, coverage, & linting sanity check
|
100
|
+
2. Update the version number in `version.rb`, and ensure `CHANGELOG.md` reflects changes
|
101
|
+
3. Run `bin/setup && bin/rake` again as a secondary check, and to update `Gemfile.lock`
|
102
|
+
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]!
|
105
|
+
6. Run `export GIT_TRUNK_BRANCH_NAME="$(git remote show origin | grep 'HEAD branch' | cut -d ' ' -f5)" && echo $GIT_TRUNK_BRANCH_NAME`
|
106
|
+
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
|
109
|
+
- Run `export SOURCE_DATE_EPOCH=$EPOCHSECONDS && echo $SOURCE_DATE_EPOCH`
|
110
|
+
- 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`.
|
112
|
+
- In older versions of `bash` you can use `date +%s` instead, i.e. `export SOURCE_DATE_EPOCH=$(date +%s) && echo $SOURCE_DATE_EPOCH`
|
113
|
+
10. Run `bundle exec rake build`
|
114
|
+
11. Run `bin/gem_checksums` (more context [1][🔒️rubygems-checksums-pr], [2][🔒️rubygems-guides-pr])
|
115
|
+
to create SHA-256 and SHA-512 checksums. This functionality is provided by the `stone_checksums`
|
116
|
+
[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]
|
43
120
|
|
44
|
-
[
|
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
|
124
|
+
[🖐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
|
129
|
+
[🔒️rubygems-security-guide]: https://guides.rubygems.org/security/#building-gems
|
130
|
+
[🔒️rubygems-checksums-pr]: https://github.com/rubygems/rubygems/pull/6022
|
131
|
+
[🔒️rubygems-guides-pr]: https://github.com/rubygems/guides/pull/325
|
132
|
+
[💎stone_checksums]: https://github.com/pboling/stone_checksums
|
133
|
+
[📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
|
134
|
+
[📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-FFDD67.svg?style=flat
|
135
|
+
[📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139
|
136
|
+
[📌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
|
139
|
+
[🏃♂️runner-tool-cache]: https://github.com/ruby/ruby-builder/releases/tag/toolcache
|
data/{LICENSE → LICENSE.txt}
RENAMED
@@ -1,7 +1,7 @@
|
|
1
1
|
MIT License
|
2
2
|
|
3
3
|
Copyright (c) 2011 - 2013 Michael Bleigh and Intridea, Inc.
|
4
|
-
Copyright (c) 2017 -
|
4
|
+
Copyright (c) 2017 - 2025 Peter H. Boling, of RailsBling.com, and OAuth2 contributors
|
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
|