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/README.md
CHANGED
@@ -7,64 +7,264 @@
|
|
7
7
|
</a>
|
8
8
|
</p>
|
9
9
|
|
10
|
-
##
|
10
|
+
## 🔐 OAuth2
|
11
|
+
|
12
|
+
[![Version][👽versioni]][👽version]
|
13
|
+
[![License: MIT][📄license-img]][📄license-ref]
|
14
|
+
[![Downloads Rank][👽dl-ranki]][👽dl-rank]
|
15
|
+
[![Open Source Helpers][👽oss-helpi]][👽oss-help]
|
16
|
+
[![Depfu][🔑depfui♻️]][🔑depfu]
|
17
|
+
[![Coveralls Test Coverage][🔑coveralls-img]][🔑coveralls]
|
18
|
+
[![QLTY Test Coverage][🔑cc-covi♻️]][🔑cc-cov]
|
19
|
+
[![Maintainability][🔑cc-mnti♻️]][🔑cc-mnt]
|
20
|
+
[![CI Heads][🚎3-hd-wfi]][🚎3-hd-wf]
|
21
|
+
[![CI Runtime Dependencies @ HEAD][🚎12-crh-wfi]][🚎12-crh-wf]
|
22
|
+
[![CI Current][🚎11-c-wfi]][🚎11-c-wf]
|
23
|
+
[![CI Truffle Ruby][🚎9-t-wfi]][🚎9-t-wf]
|
24
|
+
[![CI JRuby][🚎10-j-wfi]][🚎10-j-wf]
|
25
|
+
[![CI Supported][🚎6-s-wfi]][🚎6-s-wf]
|
26
|
+
[![CI Legacy][🚎4-lg-wfi]][🚎4-lg-wf]
|
27
|
+
[![CI Unsupported][🚎7-us-wfi]][🚎7-us-wf]
|
28
|
+
[![CI Ancient][🚎1-an-wfi]][🚎1-an-wf]
|
29
|
+
[![CI Test Coverage][🚎2-cov-wfi]][🚎2-cov-wf]
|
30
|
+
[![CI Style][🚎5-st-wfi]][🚎5-st-wf]
|
31
|
+
|
32
|
+
---
|
33
|
+
|
34
|
+
[![Liberapay Patrons][⛳liberapay-img]][⛳liberapay]
|
35
|
+
[![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor]
|
36
|
+
[![Buy me a coffee][🖇buyme-small-img]][🖇buyme]
|
37
|
+
[![Donate on Polar][🖇polar-img]][🖇polar]
|
38
|
+
[![Donate to my FLOSS or refugee efforts at ko-fi.com][🖇kofi-img]][🖇kofi]
|
39
|
+
[![Donate to my FLOSS or refugee efforts using Patreon][🖇patreon-img]][🖇patreon]
|
11
40
|
|
12
41
|
OAuth 2.0 is the industry-standard protocol for authorization.
|
13
42
|
OAuth 2.0 focuses on client developer simplicity while providing specific authorization flows for web applications,
|
14
43
|
desktop applications, mobile phones, and living room devices.
|
15
|
-
This is a RubyGem for implementing OAuth 2.0 clients
|
16
|
-
See the sibling `oauth` gem for OAuth 1.0 implementations in Ruby.
|
44
|
+
This is a RubyGem for implementing OAuth 2.0 clients (not servers) in Ruby applications.
|
17
45
|
|
18
|
-
|
46
|
+
| Federated [DVCS][💎d-in-dvcs] Repository | Status | Issues | PRs | Wiki | CI | Discussions |
|
47
|
+
|-----------------------------------------------|----------------|--------|-----|------|----------------|-------------|
|
48
|
+
| 🧪 [oauth-xx/oauth2 on GitLab][📜src-gl] | The Truth | 💚 | 💚 | 💚 | 🏀 Tiny Matrix | ➖ |
|
49
|
+
| 🐙 [oauth-xx/oauth2 on GitHub][📜src-gh] | A Dirty Mirror | 💚 | 💚 | ➖ | 💯 Full Matrix | ➖ |
|
50
|
+
| 🤼 [OAuth Ruby Google Group][⛳gg-discussions] | "Active" | ➖ | ➖ | ➖ | ➖ | 💚 |
|
51
|
+
|
52
|
+
### Upgrading Runtime Gem Dependencies
|
53
|
+
|
54
|
+
This project sits underneath a large portion of the authentication systems on the internet.
|
55
|
+
According to GitHub's project tracking, which I believe only reports on public projects,
|
56
|
+
[100,000+ projects](https://github.com/oauth-xx/oauth2/network/dependents), and
|
57
|
+
[500+ packages](https://github.com/oauth-xx/oauth2/network/dependents?dependent_type=PACKAGE) depend on this project.
|
58
|
+
|
59
|
+
That means it is painful for the Ruby community when this gem forces updates to its runtime dependencies.
|
60
|
+
|
61
|
+
As a result, great care, and a lot of time, have been invested to ensure this gem is working with all the
|
62
|
+
leading versions per each minor version of Ruby of all the runtime dependencies it can install with.
|
63
|
+
|
64
|
+
What does that mean specifically for the runtime dependencies?
|
65
|
+
|
66
|
+
We have 100% test coverage of lines and branches, and this test suite runs across a large matrix
|
67
|
+
covering the latest patch for each of the following minor versions:
|
68
|
+
|
69
|
+
* MRI Ruby @ v2.3, v2.4, v2.5, v2.6, v2.7, v3.0, v3.1, v3.2, v3.3, v3.4, HEAD
|
70
|
+
* NOTE: This gem will still install on ruby v2.2, but vanilla GitHub Actions no longer supports testing against it, so YMMV.
|
71
|
+
* JRuby @ v9.2, v9.3, v9.4, v10.0, HEAD
|
72
|
+
* TruffleRuby @ v23.1, v23.2, HEAD
|
73
|
+
* gem `faraday` @ v0, v1, v2, HEAD
|
74
|
+
* gem `jwt` @ v1, v2, v3, HEAD
|
75
|
+
* gem `logger` @ v1.2, v1.5, v1.7, HEAD
|
76
|
+
* gem `multi_xml` @ v0.5, v0.6, v0.7, HEAD
|
77
|
+
* gem `rack` @ v1.2, v1.6, v2, v3, HEAD
|
78
|
+
|
79
|
+
- This gem follows a _strict & correct_ (according to the maintainer of SemVer; [more info][sv-pub-api]) interpretation of SemVer.
|
80
|
+
- Dropping support for **any** of the runtime dependency versions above will be a major version bump.
|
81
|
+
- If you aren't on one of the minor versions above, make getting there a priority.
|
82
|
+
- You should upgrade this gem with confidence\*.
|
83
|
+
- You should upgrade the dependencies of this gem with confidence\*.
|
84
|
+
- Please do upgrade, and then, when it goes smooth as butter [please sponsor me][🖇sponsor]. Thanks!
|
85
|
+
|
86
|
+
If you are thinking, "that list is missing two runtime dependencies", you are correct!
|
87
|
+
Both of them were extracted from this gem. They are part of the `oauth-xx` org,
|
88
|
+
and are developed in tight collaboration with this gem, so not much more needs to be said about them.
|
89
|
+
|
90
|
+
* gem `snaky_hash` - https://gitlab.com/oauth-xx/snaky_hash
|
91
|
+
* gem `version_gem` - https://gitlab.com/oauth-xx/version_gem
|
92
|
+
|
93
|
+
[sv-pub-api]: #-is-platform-support-part-of-the-public-api
|
94
|
+
|
95
|
+
\* MIT license; I am unable to make guarantees.
|
96
|
+
|
97
|
+
| 🚚 Test matrix brought to you by | 🔎 appraisal++ |
|
98
|
+
|----------------------------------|-------------------------------------------------------------------------|
|
99
|
+
| Adds back support for old Rubies | ✨ [appraisal PR #250](https://github.com/thoughtbot/appraisal/pull/250) |
|
100
|
+
| Adds support for `eval_gemfile` | ✨ [appraisal PR #248](https://github.com/thoughtbot/appraisal/pull/248) |
|
101
|
+
| Please review | my PRs! |
|
102
|
+
|
103
|
+
<details>
|
104
|
+
<summary>Standard Library Dependencies</summary>
|
105
|
+
|
106
|
+
The various versions of each are tested via the Ruby test matrix, along with whatever Ruby includes them.
|
107
|
+
|
108
|
+
* base64
|
109
|
+
* cgi
|
110
|
+
* json
|
111
|
+
* time
|
112
|
+
* logger (removed from stdlib in Ruby 3.5 so added as runtime dependency in v2.0.10)
|
113
|
+
|
114
|
+
If you use a gem version it should work fine!
|
115
|
+
|
116
|
+
</details>
|
117
|
+
|
118
|
+
### Quick Usage Example for AI and Copy / Pasting
|
119
|
+
|
120
|
+
Convert the following `curl` command into a token request using this gem...
|
121
|
+
|
122
|
+
```shell
|
123
|
+
curl --request POST \
|
124
|
+
--url 'https://login.microsoftonline.com/REDMOND_REDACTED/oauth2/token' \
|
125
|
+
--header 'content-type: application/x-www-form-urlencoded' \
|
126
|
+
--data grant_type=client_credentials \
|
127
|
+
--data client_id=REDMOND_CLIENT_ID \
|
128
|
+
--data client_secret=REDMOND_CLIENT_SECRET \
|
129
|
+
--data resource=REDMOND_RESOURCE_UUID
|
130
|
+
```
|
131
|
+
|
132
|
+
NOTE: In the ruby version below, certain params are passed to the `get_token` call, instead of the client creation.
|
133
|
+
|
134
|
+
```ruby
|
135
|
+
OAuth2::Client.new(
|
136
|
+
"REDMOND_CLIENT_ID", # client_id
|
137
|
+
"REDMOND_CLIENT_SECRET", # client_secret
|
138
|
+
auth_scheme: :request_body, # Other modes are supported: :basic_auth, :tls_client_auth, :private_key_jwt
|
139
|
+
token_url: "oauth2/token", # relative path, except with leading `/`, then absolute path
|
140
|
+
site: "https://login.microsoftonline.com/REDMOND_REDACTED",
|
141
|
+
). # The base path for token_url when it is relative
|
142
|
+
client_credentials. # There are many other types to choose from!
|
143
|
+
get_token(resource: "REDMOND_RESOURCE_UUID")
|
144
|
+
```
|
145
|
+
|
146
|
+
NOTE: `header` - The content type specified in the `curl` is already the default!
|
147
|
+
|
148
|
+
If any of the above makes you uncomfortable, you may be in the wrong place.
|
149
|
+
One of these might be what you are looking for:
|
19
150
|
|
20
151
|
* [OAuth 2.0 Spec][oauth2-spec]
|
152
|
+
* [doorkeeper gem][doorkeeper-gem] for OAuth 2.0 server/provider implementation.
|
21
153
|
* [oauth sibling gem][sibling-gem] for OAuth 1.0 implementations in Ruby.
|
22
154
|
|
23
155
|
[oauth2-spec]: https://oauth.net/2/
|
24
156
|
[sibling-gem]: https://gitlab.com/oauth-xx/oauth
|
25
|
-
|
26
|
-
|
157
|
+
[doorkeeper-gem]: https://github.com/doorkeeper-gem/doorkeeper
|
158
|
+
|
159
|
+
## 💡 Info you can shake a stick at
|
160
|
+
|
161
|
+
| Tokens to Remember | [![Gem name][⛳️name-img]][⛳️gem-name] [![Gem namespace][⛳️namespace-img]][⛳️gem-namespace] |
|
162
|
+
|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
163
|
+
| Works with JRuby | [![JRuby 9.2 Compat][💎jruby-9.2i]][🚎10-j-wf] [![JRuby 9.3 Compat][💎jruby-9.3i]][🚎10-j-wf] [![JRuby 9.4 Compat][💎jruby-9.4i]][🚎10-j-wf] [![JRuby 10.0 Compat][💎jruby-c-i]][🚎11-c-wf] [![JRuby HEAD Compat][💎jruby-headi]][🚎3-hd-wf] |
|
164
|
+
| Works with Truffle Ruby | [![Truffle Ruby 23.1 Compat][💎truby-23.1i]][🚎9-t-wf] [![Truffle Ruby 24.1 Compat][💎truby-c-i]][🚎11-c-wf] [![Truffle Ruby HEAD Compat][💎truby-headi]][🚎3-hd-wf] |
|
165
|
+
| Works with MRI Ruby 3 | [![Ruby 3.0 Compat][💎ruby-3.0i]][🚎4-lg-wf] [![Ruby 3.1 Compat][💎ruby-3.1i]][🚎6-s-wf] [![Ruby 3.2 Compat][💎ruby-3.2i]][🚎6-s-wf] [![Ruby 3.3 Compat][💎ruby-3.3i]][🚎6-s-wf] [![Ruby 3.4 Compat][💎ruby-c-i]][🚎11-c-wf] [![Ruby HEAD Compat][💎ruby-headi]][🚎3-hd-wf] |
|
166
|
+
| Works with MRI Ruby 2 | [![Ruby 2.3 Compat][💎ruby-2.3i]][🚎1-an-wf] [![Ruby 2.4 Compat][💎ruby-2.4i]][🚎1-an-wf] [![Ruby 2.5 Compat][💎ruby-2.5i]][🚎1-an-wf] [![Ruby 2.6 Compat][💎ruby-2.6i]][🚎7-us-wf] [![Ruby 2.7 Compat][💎ruby-2.7i]][🚎7-us-wf] |
|
167
|
+
| Source | [![Source on GitLab.com][📜src-gl-img]][📜src-gl] [![Source on CodeBerg.org][📜src-cb-img]][📜src-cb] [![Source on Github.com][📜src-gh-img]][📜src-gh] [![The best SHA: dQw4w9WgXcQ!][🧮kloc-img]][🧮kloc] |
|
168
|
+
| Documentation | [![Discussion][⛳gg-discussions-img]][⛳gg-discussions] [![Current release on RubyDoc.info][📜docs-cr-rd-img]][🚎yard-current] [![HEAD on RubyDoc.info][📜docs-head-rd-img]][🚎yard-head] [![BDFL Blog][🚂bdfl-blog-img]][🚂bdfl-blog] [![Wiki][📜wiki-img]][📜wiki] |
|
169
|
+
| Compliance | [![License: MIT][📄license-img]][📄license-ref] [![📄ilo-declaration-img]][📄ilo-declaration] [![Security Policy][🔐security-img]][🔐security] [![Enforced Code Style][💎rlts-img]][💎rlts] [![CodeQL][🖐codeQL-img]][🖐codeQL] [![Contributor Covenant 2.1][🪇conduct-img]][🪇conduct] [![SemVer 2.0.0][📌semver-img]][📌semver] [![Keep-A-Changelog 1.0.0][📗keep-changelog-img]][📗keep-changelog] [![Gitmoji Commits][📌gitmoji-img]][📌gitmoji] [![FOSSA][🏘fossa-img]][🏘fossa] |
|
170
|
+
| Expert 1:1 Support | [![Get help from me on Upwork][👨🏼🏫expsup-upwork-img]][👨🏼🏫expsup-upwork] `or` [![Get help from me on Codementor][👨🏼🏫expsup-codementor-img]][👨🏼🏫expsup-codementor] |
|
171
|
+
| Enterprise Support | [![Get help from me on Tidelift][🏙️entsup-tidelift-img]][🏙️entsup-tidelift]<br/>💡Subscribe for support guarantees covering _all_ FLOSS dependencies!<br/>💡Tidelift is part of [Sonar][🏙️entsup-tidelift-sonar]!<br/>💡Tidelift pays maintainers to maintain the software you depend on!<br/>📊`@`Pointy Haired Boss: An [enterprise support][🏙️entsup-tidelift] subscription is "[never gonna let you down][🧮kloc]", and *supports* open source maintainers! |
|
172
|
+
| Comrade BDFL 🎖️ | [![Follow Me on LinkedIn][💖🖇linkedin-img]][💖🖇linkedin] [![Follow Me on Ruby.Social][💖🐘ruby-mast-img]][💖🐘ruby-mast] [![Follow Me on Bluesky][💖🦋bluesky-img]][💖🦋bluesky] [![Contact BDFL][🚂bdfl-contact-img]][🚂bdfl-contact] [![My technical writing][💖💁🏼♂️devto-img]][💖💁🏼♂️devto] |
|
173
|
+
| `...` 💖 | [![Find Me on WellFound:][💖✌️wellfound-img]][💖✌️wellfound] [![Find Me on CrunchBase][💖💲crunchbase-img]][💖💲crunchbase] [![My LinkTree][💖🌳linktree-img]][💖🌳linktree] [![More About Me][💖💁🏼♂️aboutme-img]][💖💁🏼♂️aboutme] [🧊][💖🧊berg] [🐙][💖🐙hub] [🛖][💖🛖hut] [🧪][💖🧪lab] |
|
174
|
+
|
175
|
+
## 🚀 Release Documentation
|
27
176
|
|
28
177
|
### Version 2.0.x
|
29
178
|
|
30
179
|
<details>
|
31
|
-
<summary>2.0.x
|
32
|
-
|
33
|
-
| Version | Release Date |
|
34
|
-
|
35
|
-
| 2.0.
|
36
|
-
| 2.0.
|
37
|
-
| 2.0.
|
38
|
-
| 2.0.
|
39
|
-
| 2.0.
|
40
|
-
| 2.0.
|
41
|
-
| 2.0.
|
42
|
-
| 2.0.
|
43
|
-
| 2.0.
|
44
|
-
| 2.0.
|
180
|
+
<summary>2.0.x CHANGELOGs and READMEs</summary>
|
181
|
+
|
182
|
+
| Version | Release Date | CHANGELOG | README |
|
183
|
+
|---------|--------------|---------------------------------------|---------------------------------|
|
184
|
+
| 2.0.10 | 2025-05-16 | [v2.0.10 CHANGELOG][2.0.10-changelog] | [v2.0.10 README][2.0.10-readme] |
|
185
|
+
| 2.0.9 | 2022-09-16 | [v2.0.9 CHANGELOG][2.0.9-changelog] | [v2.0.9 README][2.0.9-readme] |
|
186
|
+
| 2.0.8 | 2022-09-01 | [v2.0.8 CHANGELOG][2.0.8-changelog] | [v2.0.8 README][2.0.8-readme] |
|
187
|
+
| 2.0.7 | 2022-08-22 | [v2.0.7 CHANGELOG][2.0.7-changelog] | [v2.0.7 README][2.0.7-readme] |
|
188
|
+
| 2.0.6 | 2022-07-13 | [v2.0.6 CHANGELOG][2.0.6-changelog] | [v2.0.6 README][2.0.6-readme] |
|
189
|
+
| 2.0.5 | 2022-07-07 | [v2.0.5 CHANGELOG][2.0.5-changelog] | [v2.0.5 README][2.0.5-readme] |
|
190
|
+
| 2.0.4 | 2022-07-01 | [v2.0.4 CHANGELOG][2.0.4-changelog] | [v2.0.4 README][2.0.4-readme] |
|
191
|
+
| 2.0.3 | 2022-06-28 | [v2.0.3 CHANGELOG][2.0.3-changelog] | [v2.0.3 README][2.0.3-readme] |
|
192
|
+
| 2.0.2 | 2022-06-24 | [v2.0.2 CHANGELOG][2.0.2-changelog] | [v2.0.2 README][2.0.2-readme] |
|
193
|
+
| 2.0.1 | 2022-06-22 | [v2.0.1 CHANGELOG][2.0.1-changelog] | [v2.0.1 README][2.0.1-readme] |
|
194
|
+
| 2.0.0 | 2022-06-21 | [v2.0.0 CHANGELOG][2.0.0-changelog] | [v2.0.0 README][2.0.0-readme] |
|
45
195
|
</details>
|
46
196
|
|
197
|
+
[2.0.10-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#2010---2025-05-16
|
198
|
+
[2.0.9-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#209---2022-09-16
|
199
|
+
[2.0.8-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#208---2022-09-01
|
200
|
+
[2.0.7-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#207---2022-08-22
|
201
|
+
[2.0.6-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#206---2022-07-13
|
202
|
+
[2.0.5-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#205---2022-07-07
|
203
|
+
[2.0.4-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#204---2022-07-01
|
204
|
+
[2.0.3-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#203---2022-06-28
|
205
|
+
[2.0.2-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#202---2022-06-24
|
206
|
+
[2.0.1-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#201---2022-06-22
|
207
|
+
[2.0.0-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#200---2022-06-21
|
208
|
+
|
209
|
+
[2.0.10-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.10/README.md
|
210
|
+
[2.0.9-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.9/README.md
|
211
|
+
[2.0.8-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.8/README.md
|
212
|
+
[2.0.7-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.7/README.md
|
213
|
+
[2.0.6-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.6/README.md
|
214
|
+
[2.0.5-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.5/README.md
|
215
|
+
[2.0.4-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.4/README.md
|
216
|
+
[2.0.3-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.3/README.md
|
217
|
+
[2.0.2-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.2/README.md
|
218
|
+
[2.0.1-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.1/README.md
|
219
|
+
[2.0.0-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v2.0.0/README.md
|
220
|
+
|
47
221
|
### Older Releases
|
48
222
|
|
49
223
|
<details>
|
50
|
-
<summary>1.4.x
|
51
|
-
|
52
|
-
| Version | Release Date |
|
53
|
-
|
54
|
-
| 1.4.11 | Sep 16, 2022 |
|
55
|
-
| 1.4.10 | Jul 1, 2022 |
|
56
|
-
| 1.4.9 | Feb 20, 2022 |
|
57
|
-
| 1.4.8 | Feb 18, 2022 |
|
58
|
-
| 1.4.7 | Mar 19, 2021 |
|
59
|
-
| 1.4.6 | Mar 19, 2021 |
|
60
|
-
| 1.4.5 | Mar 18, 2021 |
|
61
|
-
| 1.4.4 | Feb 12, 2020 |
|
62
|
-
| 1.4.3 | Jan 29, 2020 |
|
63
|
-
| 1.4.2 | Oct 1, 2019 |
|
64
|
-
| 1.4.1 | Oct 13, 2018 |
|
65
|
-
| 1.4.0 | Jun 9, 2017 |
|
224
|
+
<summary>1.4.x CHANGELOGs and READMEs</summary>
|
225
|
+
|
226
|
+
| Version | Release Date | CHANGELOG | README |
|
227
|
+
|---------|--------------|---------------------------------------|---------------------------------|
|
228
|
+
| 1.4.11 | Sep 16, 2022 | [v1.4.11 CHANGELOG][1.4.11-changelog] | [v1.4.11 README][1.4.11-readme] |
|
229
|
+
| 1.4.10 | Jul 1, 2022 | [v1.4.10 CHANGELOG][1.4.10-changelog] | [v1.4.10 README][1.4.10-readme] |
|
230
|
+
| 1.4.9 | Feb 20, 2022 | [v1.4.9 CHANGELOG][1.4.9-changelog] | [v1.4.9 README][1.4.9-readme] |
|
231
|
+
| 1.4.8 | Feb 18, 2022 | [v1.4.8 CHANGELOG][1.4.8-changelog] | [v1.4.8 README][1.4.8-readme] |
|
232
|
+
| 1.4.7 | Mar 19, 2021 | [v1.4.7 CHANGELOG][1.4.7-changelog] | [v1.4.7 README][1.4.7-readme] |
|
233
|
+
| 1.4.6 | Mar 19, 2021 | [v1.4.6 CHANGELOG][1.4.6-changelog] | [v1.4.6 README][1.4.6-readme] |
|
234
|
+
| 1.4.5 | Mar 18, 2021 | [v1.4.5 CHANGELOG][1.4.5-changelog] | [v1.4.5 README][1.4.5-readme] |
|
235
|
+
| 1.4.4 | Feb 12, 2020 | [v1.4.4 CHANGELOG][1.4.4-changelog] | [v1.4.4 README][1.4.4-readme] |
|
236
|
+
| 1.4.3 | Jan 29, 2020 | [v1.4.3 CHANGELOG][1.4.3-changelog] | [v1.4.3 README][1.4.3-readme] |
|
237
|
+
| 1.4.2 | Oct 1, 2019 | [v1.4.2 CHANGELOG][1.4.2-changelog] | [v1.4.2 README][1.4.2-readme] |
|
238
|
+
| 1.4.1 | Oct 13, 2018 | [v1.4.1 CHANGELOG][1.4.1-changelog] | [v1.4.1 README][1.4.1-readme] |
|
239
|
+
| 1.4.0 | Jun 9, 2017 | [v1.4.0 CHANGELOG][1.4.0-changelog] | [v1.4.0 README][1.4.0-readme] |
|
66
240
|
</details>
|
67
241
|
|
242
|
+
[1.4.11-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#1411---2022-09-16
|
243
|
+
[1.4.10-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#1410---2022-07-01
|
244
|
+
[1.4.9-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#149---2022-02-20
|
245
|
+
[1.4.8-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#148---2022-02-18
|
246
|
+
[1.4.7-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#147---2021-03-19
|
247
|
+
[1.4.6-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#146---2021-03-19
|
248
|
+
[1.4.5-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#145---2021-03-18
|
249
|
+
[1.4.4-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#144---2020-02-12
|
250
|
+
[1.4.3-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#143---2020-01-29
|
251
|
+
[1.4.2-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#142---2019-10-01
|
252
|
+
[1.4.1-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#141---2018-10-13
|
253
|
+
[1.4.0-changelog]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md?ref_type=heads#140---2017-06-09
|
254
|
+
|
255
|
+
[1.4.11-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v1.4.11/README.md
|
256
|
+
[1.4.10-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v1.4.10/README.md
|
257
|
+
[1.4.9-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v1.4.9/README.md
|
258
|
+
[1.4.8-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v1.4.8/README.md
|
259
|
+
[1.4.7-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v1.4.7/README.md
|
260
|
+
[1.4.6-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v1.4.6/README.md
|
261
|
+
[1.4.5-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v1.4.5/README.md
|
262
|
+
[1.4.4-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v1.4.4/README.md
|
263
|
+
[1.4.3-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v1.4.3/README.md
|
264
|
+
[1.4.2-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v1.4.2/README.md
|
265
|
+
[1.4.1-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v1.4.1/README.md
|
266
|
+
[1.4.0-readme]: https://gitlab.com/oauth-xx/oauth2/-/blob/v1.4.0/README.md
|
267
|
+
|
68
268
|
<details>
|
69
269
|
<summary>1.3.x Readmes</summary>
|
70
270
|
|
@@ -85,135 +285,7 @@ See the sibling `oauth` gem for OAuth 1.0 implementations in Ruby.
|
|
85
285
|
| < 1.0.0 | Find here | https://gitlab.com/oauth-xx/oauth2/-/tags |
|
86
286
|
</details>
|
87
287
|
|
88
|
-
##
|
89
|
-
|
90
|
-
<!--
|
91
|
-
Numbering rows and badges in each row as a visual "database" lookup,
|
92
|
-
as the table is extremely dense, and it can be very difficult to find anything
|
93
|
-
Putting one on each row here, to document the emoji that should be used, and for ease of copy/paste.
|
94
|
-
|
95
|
-
row #s:
|
96
|
-
1️⃣
|
97
|
-
2️⃣
|
98
|
-
3️⃣
|
99
|
-
4️⃣
|
100
|
-
5️⃣
|
101
|
-
6️⃣
|
102
|
-
7️⃣
|
103
|
-
|
104
|
-
badge #s:
|
105
|
-
⛳️
|
106
|
-
🖇
|
107
|
-
🏘
|
108
|
-
🚎
|
109
|
-
🖐
|
110
|
-
🧮
|
111
|
-
📗
|
112
|
-
|
113
|
-
appended indicators:
|
114
|
-
♻️ - URL needs to be updated from SASS integration. Find / Replace is insufficient.
|
115
|
-
-->
|
116
|
-
|
117
|
-
| | Project | bundle add oauth2 |
|
118
|
-
|:----|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
119
|
-
| 1️⃣ | name, license, docs | [![RubyGems.org][⛳️name-img]][⛳️gem] [![License: MIT][🖇src-license-img]][🖇src-license] [![FOSSA][🏘fossa-img]][🏘fossa] [![RubyDoc.info][🚎yard-img]][🚎yard] [![InchCI][🖐inch-ci-img]][🚎yard] |
|
120
|
-
| 2️⃣ | version & activity | [![Gem Version][⛳️version-img]][⛳️gem] [![Total Downloads][🖇DL-total-img]][⛳️gem] [![Download Rank][🏘DL-rank-img]][⛳️gem] [![Source Code][🚎src-home-img]][🚎src-home] |
|
121
|
-
| 3️⃣ | maintanence & linting | [![Maintainability][⛳cclim-maint-img♻️]][⛳cclim-maint] [![Helpers][🖇triage-help-img]][🖇triage-help] [![Depfu][🏘depfu-img♻️]][🏘depfu♻️] [![Contributors][🚎contributors-img]][🚎contributors] [![Style][🖐style-wf-img]][🖐style-wf] [![Kloc Roll][🧮kloc-img]][🧮kloc] |
|
122
|
-
| 4️⃣ | testing | [![Supported][🏘sup-wf-img]][🏘sup-wf] [![Heads][🚎heads-wf-img]][🚎heads-wf] [![Unofficial Support][🖐uns-wf-img]][🖐uns-wf] [![MacOS][🧮mac-wf-img]][🧮mac-wf] [![Windows][📗win-wf-img]][📗win-wf] |
|
123
|
-
| 5️⃣ | coverage & security | [![CodeClimate][⛳cclim-cov-img♻️]][⛳cclim-cov] [![CodeCov][🖇codecov-img♻️]][🖇codecov] [![Coveralls][🏘coveralls-img]][🏘coveralls] [![Security Policy][🚎sec-pol-img]][🚎sec-pol] [![CodeQL][🖐codeQL-img]][🖐codeQL] [![Code Coverage][🧮cov-wf-img]][🧮cov-wf] |
|
124
|
-
| 6️⃣ | resources | [![Discussion][⛳gg-discussions-img]][⛳gg-discussions] [![Get help on Codementor][🖇codementor-img]][🖇codementor] [![Chat][🏘chat-img]][🏘chat] [![Blog][🚎blog-img]][🚎blog] [![Blog][🖐wiki-img]][🖐wiki] |
|
125
|
-
| 7️⃣ | spread 💖 | [![Liberapay Patrons][⛳liberapay-img]][⛳liberapay] [![Sponsor Me][🖇sponsor-img]][🖇sponsor] [![Tweet @ Peter][🏘tweet-img]][🏘tweet] [🌏][aboutme] [👼][angelme] [💻][coderme] |
|
126
|
-
|
127
|
-
<!--
|
128
|
-
The link tokens in the following sections should be kept ordered by the row and badge numbering scheme
|
129
|
-
-->
|
130
|
-
|
131
|
-
<!-- 1️⃣ name, license, docs -->
|
132
|
-
[⛳️gem]: https://rubygems.org/gems/oauth2
|
133
|
-
[⛳️name-img]: https://img.shields.io/badge/name-oauth2-brightgreen.svg?style=flat
|
134
|
-
[🖇src-license]: https://opensource.org/licenses/MIT
|
135
|
-
[🖇src-license-img]: https://img.shields.io/badge/License-MIT-green.svg
|
136
|
-
[🏘fossa]: https://app.fossa.io/projects/git%2Bgithub.com%2Foauth-xx%2Foauth2?ref=badge_shield
|
137
|
-
[🏘fossa-img]: https://app.fossa.io/api/projects/git%2Bgithub.com%2Foauth-xx%2Foauth2.svg?type=shield
|
138
|
-
[🚎yard]: https://www.rubydoc.info/github/oauth-xx/oauth2
|
139
|
-
[🚎yard-img]: https://img.shields.io/badge/documentation-rubydoc-brightgreen.svg?style=flat
|
140
|
-
[🖐inch-ci-img]: http://inch-ci.org/github/oauth-xx/oauth2.png
|
141
|
-
|
142
|
-
<!-- 2️⃣ version & activity -->
|
143
|
-
[⛳️version-img]: http://img.shields.io/gem/v/oauth2.svg
|
144
|
-
[🖇DL-total-img]: https://img.shields.io/gem/dt/oauth2.svg
|
145
|
-
[🏘DL-rank-img]: https://img.shields.io/gem/rt/oauth2.svg
|
146
|
-
[🚎src-home]: https://gitlab.com/oauth-xx/oauth2/
|
147
|
-
[🚎src-home-img]: https://img.shields.io/badge/source-gitlab-blue.svg?style=flat
|
148
|
-
|
149
|
-
<!-- 3️⃣ maintenance & linting -->
|
150
|
-
[⛳cclim-maint]: https://codeclimate.com/github/oauth-xx/oauth2/maintainability
|
151
|
-
[⛳cclim-maint-img♻️]: https://api.codeclimate.com/v1/badges/688c612528ff90a46955/maintainability
|
152
|
-
[🖇triage-help]: https://www.codetriage.com/oauth-xx/oauth2
|
153
|
-
[🖇triage-help-img]: https://www.codetriage.com/oauth-xx/oauth2/badges/users.svg
|
154
|
-
[🏘depfu♻️]: https://depfu.com/github/oauth-xx/oauth2?project_id=4445
|
155
|
-
[🏘depfu-img♻️]: https://badges.depfu.com/badges/6d34dc1ba682bbdf9ae2a97848241743/count.svg
|
156
|
-
[🚎contributors]: https://gitlab.com/oauth-xx/oauth2/-/graphs/main
|
157
|
-
[🚎contributors-img]: https://img.shields.io/github/contributors-anon/oauth-xx/oauth2
|
158
|
-
[🖐style-wf]: https://github.com/oauth-xx/oauth2/actions/workflows/style.yml
|
159
|
-
[🖐style-wf-img]: https://github.com/oauth-xx/oauth2/actions/workflows/style.yml/badge.svg
|
160
|
-
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
161
|
-
[🧮kloc-img]: https://img.shields.io/tokei/lines/github.com/oauth-xx/oauth2
|
162
|
-
|
163
|
-
<!-- 4️⃣ testing -->
|
164
|
-
[🏘sup-wf]: https://github.com/oauth-xx/oauth2/actions/workflows/supported.yml
|
165
|
-
[🏘sup-wf-img]: https://github.com/oauth-xx/oauth2/actions/workflows/supported.yml/badge.svg
|
166
|
-
[🚎heads-wf]: https://github.com/oauth-xx/oauth2/actions/workflows/heads.yml
|
167
|
-
[🚎heads-wf-img]: https://github.com/oauth-xx/oauth2/actions/workflows/heads.yml/badge.svg
|
168
|
-
[🖐uns-wf]: https://github.com/oauth-xx/oauth2/actions/workflows/unsupported.yml
|
169
|
-
[🖐uns-wf-img]: https://github.com/oauth-xx/oauth2/actions/workflows/unsupported.yml/badge.svg
|
170
|
-
[🧮mac-wf]: https://github.com/oauth-xx/oauth2/actions/workflows/macos.yml
|
171
|
-
[🧮mac-wf-img]: https://github.com/oauth-xx/oauth2/actions/workflows/macos.yml/badge.svg
|
172
|
-
[📗win-wf]: https://github.com/oauth-xx/oauth2/actions/workflows/windows.yml
|
173
|
-
[📗win-wf-img]: https://github.com/oauth-xx/oauth2/actions/workflows/windows.yml/badge.svg
|
174
|
-
|
175
|
-
<!-- 5️⃣ coverage & security -->
|
176
|
-
[⛳cclim-cov]: https://codeclimate.com/github/oauth-xx/oauth2/test_coverage
|
177
|
-
[⛳cclim-cov-img♻️]: https://api.codeclimate.com/v1/badges/688c612528ff90a46955/test_coverage
|
178
|
-
[🖇codecov-img♻️]: https://codecov.io/gh/oauth-xx/oauth2/branch/main/graph/badge.svg?token=bNqSzNiuo2
|
179
|
-
[🖇codecov]: https://codecov.io/gh/oauth-xx/oauth2
|
180
|
-
[🏘coveralls]: https://coveralls.io/github/oauth-xx/oauth2?branch=main
|
181
|
-
[🏘coveralls-img]: https://coveralls.io/repos/github/oauth-xx/oauth2/badge.svg?branch=main
|
182
|
-
[🚎sec-pol]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/SECURITY.md
|
183
|
-
[🚎sec-pol-img]: https://img.shields.io/badge/security-policy-brightgreen.svg?style=flat
|
184
|
-
[🖐codeQL]: https://github.com/oauth-xx/oauth2/security/code-scanning
|
185
|
-
[🖐codeQL-img]: https://github.com/oauth-xx/oauth2/actions/workflows/codeql-analysis.yml/badge.svg
|
186
|
-
[🧮cov-wf]: https://github.com/oauth-xx/oauth2/actions/workflows/coverage.yml
|
187
|
-
[🧮cov-wf-img]: https://github.com/oauth-xx/oauth2/actions/workflows/coverage.yml/badge.svg
|
188
|
-
|
189
|
-
<!-- 6️⃣ resources -->
|
190
|
-
[⛳gg-discussions]: https://groups.google.com/g/oauth-ruby
|
191
|
-
[⛳gg-discussions-img]: https://img.shields.io/badge/google-group-purple.svg?style=flat
|
192
|
-
[🖇codementor]: https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github
|
193
|
-
[🖇codementor-img]: https://cdn.codementor.io/badges/get_help_github.svg
|
194
|
-
[🏘chat]: https://gitter.im/oauth-xx/oauth2
|
195
|
-
[🏘chat-img]: https://img.shields.io/gitter/room/oauth-xx/oauth2.svg
|
196
|
-
[🚎blog]: http://www.railsbling.com/tags/oauth2/
|
197
|
-
[🚎blog-img]: https://img.shields.io/badge/blog-railsbling-brightgreen.svg?style=flat
|
198
|
-
[🖐wiki]: https://gitlab.com/oauth-xx/oauth2/-/wikis/home
|
199
|
-
[🖐wiki-img]: https://img.shields.io/badge/wiki-examples-brightgreen.svg?style=flat
|
200
|
-
|
201
|
-
<!-- 7️⃣ spread 💖 -->
|
202
|
-
[⛳liberapay-img]: https://img.shields.io/liberapay/patrons/pboling.svg?logo=liberapay
|
203
|
-
[⛳liberapay]: https://liberapay.com/pboling/donate
|
204
|
-
[🖇sponsor-img]: https://img.shields.io/badge/sponsor-pboling.svg?style=social&logo=github
|
205
|
-
[🖇sponsor]: https://github.com/sponsors/pboling
|
206
|
-
[🏘tweet-img]: https://img.shields.io/twitter/follow/galtzo.svg?style=social&label=Follow
|
207
|
-
[🏘tweet]: http://twitter.com/galtzo
|
208
|
-
|
209
|
-
<!-- Maintainer Contact Links -->
|
210
|
-
[railsbling]: http://www.railsbling.com
|
211
|
-
[peterboling]: http://www.peterboling.com
|
212
|
-
[aboutme]: https://about.me/peter.boling
|
213
|
-
[angelme]: https://angel.co/peter-boling
|
214
|
-
[coderme]:http://coderwall.com/pboling
|
215
|
-
|
216
|
-
## Installation
|
288
|
+
## ✨ Installation
|
217
289
|
|
218
290
|
Install the gem and add to the application's Gemfile by executing:
|
219
291
|
|
@@ -223,11 +295,41 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
223
295
|
|
224
296
|
$ gem install oauth2
|
225
297
|
|
298
|
+
### 🔒 Secure Installation
|
299
|
+
|
300
|
+
`oauth2` is cryptographically signed, and has verifiable [SHA-256 and SHA-512][💎SHA_checksums] checksums by
|
301
|
+
[stone_checksums][💎stone_checksums]. Be sure the gem you install hasn’t been tampered with
|
302
|
+
by following the instructions below.
|
303
|
+
|
304
|
+
Add my public key (if you haven’t already, expires 2045-04-29) as a trusted certificate:
|
305
|
+
|
306
|
+
```shell
|
307
|
+
gem cert --add <(curl -Ls https://raw.github.com/kettle-rb/oauth2/main/certs/pboling.pem)
|
308
|
+
```
|
309
|
+
|
310
|
+
You only need to do that once. Then proceed to install with:
|
311
|
+
|
312
|
+
```shell
|
313
|
+
gem install oauth2 -P MediumSecurity
|
314
|
+
```
|
315
|
+
|
316
|
+
The `MediumSecurity` trust profile will verify signed gems, but allow the installation of unsigned dependencies.
|
317
|
+
|
318
|
+
This is necessary because not all of `oauth2`’s dependencies are signed, so we cannot use `HighSecurity`.
|
319
|
+
|
320
|
+
If you want to up your security game full-time:
|
321
|
+
|
322
|
+
```shell
|
323
|
+
bundle config set --global trust-policy MediumSecurity
|
324
|
+
```
|
325
|
+
|
326
|
+
NOTE: Be prepared to track down certs for signed gems and add them the same way you added mine.
|
327
|
+
|
226
328
|
## OAuth2 for Enterprise
|
227
329
|
|
228
330
|
Available as part of the Tidelift Subscription.
|
229
331
|
|
230
|
-
The maintainers of
|
332
|
+
The maintainers of this 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]
|
231
333
|
|
232
334
|
[tidelift-ref]: https://tidelift.com/subscription/pkg/rubygems-oauth2?utm_source=rubygems-oauth2&utm_medium=referral&utm_campaign=enterprise
|
233
335
|
|
@@ -236,7 +338,7 @@ The maintainers of OAuth2 and thousands of other packages are working with Tidel
|
|
236
338
|
To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security).
|
237
339
|
Tidelift will coordinate the fix and disclosure.
|
238
340
|
|
239
|
-
For more see [SECURITY.md][
|
341
|
+
For more see [SECURITY.md][🔐security].
|
240
342
|
|
241
343
|
## What is new for v2.0?
|
242
344
|
|
@@ -253,19 +355,20 @@ For more see [SECURITY.md][🚎sec-pol].
|
|
253
355
|
- `:access_token_class` (`AccessToken`); user specified class to use for all calls to `get_token`
|
254
356
|
- Adds new option to `OAuth2::AccessToken#initialize`:
|
255
357
|
- `:expires_latency` (`nil`); number of seconds by which AccessToken validity will be reduced to offset latency
|
256
|
-
- By default, keys are transformed to
|
358
|
+
- By default, keys are transformed to snake case.
|
257
359
|
- Original keys will still work as previously, in most scenarios, thanks to `rash_alt` gem.
|
258
|
-
- However, this is a _breaking_ change if you rely on `response.parsed.to_h
|
360
|
+
- However, this is a _breaking_ change if you rely on `response.parsed.to_h` to retain the original case, and the original wasn't snake case, as the keys in the result will be snake case.
|
259
361
|
- As of version 2.0.4 you can turn key transformation off with the `snaky: false` option.
|
260
362
|
- By default, the `:auth_scheme` is now `:basic_auth` (instead of `:request_body`)
|
261
363
|
- Third-party strategies and gems may need to be updated if a provider was requiring client id/secret in the request body
|
262
|
-
- [... A lot more](https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md#
|
364
|
+
- [... A lot more](https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md#200-2022-06-21-tag)
|
263
365
|
|
264
366
|
## Compatibility
|
265
367
|
|
266
|
-
Targeted ruby compatibility is non-EOL versions of Ruby, currently 2
|
267
|
-
|
268
|
-
Ruby
|
368
|
+
Targeted ruby compatibility is non-EOL versions of Ruby, currently 3.2, 3.3, and 3.4.
|
369
|
+
Compatibility is further distinguished as "Best Effort Support" or "Incidental Support" for older versions of Ruby.
|
370
|
+
This gem will install on Ruby versions >= v2.2 for 2.x releases.
|
371
|
+
See `1-4-stable` branch for older rubies.
|
269
372
|
|
270
373
|
<details>
|
271
374
|
<summary>Ruby Engine Compatibility Policy</summary>
|
@@ -294,11 +397,11 @@ fashion. If critical issues for a particular implementation exist at the time
|
|
294
397
|
of a major release, support for that Ruby version may be dropped.
|
295
398
|
</details>
|
296
399
|
|
297
|
-
| | Ruby OAuth2 Version | Maintenance Branch |
|
298
|
-
|
299
|
-
| 1️⃣ | 2.0.x | `main` | 2
|
300
|
-
| 2️⃣ | 1.4.x | `1-4-stable` | 2.5, 2.6, 2.7, 3.0, 3.1 | 2.1, 2.2, 2.3, 2.4
|
301
|
-
| 3️⃣ | older | N/A | Best of luck to you!
|
400
|
+
| | Ruby OAuth2 Version | Maintenance Branch | Targeted Support | Best Effort Support | Incidental Support |
|
401
|
+
|:----|---------------------|--------------------|----------------------|-------------------------|------------------------------|
|
402
|
+
| 1️⃣ | 2.0.x | `main` | 3.2, 3.3, 3.4 | 2.5, 2.6, 2.7, 3.0, 3.1 | 2.2, 2.3, 2.4 |
|
403
|
+
| 2️⃣ | 1.4.x | `1-4-stable` | 3.2, 3.3, 3.4 | 2.5, 2.6, 2.7, 3.0, 3.1 | 1.9, 2.0, 2.1, 2.2, 2.3, 2.4 |
|
404
|
+
| 3️⃣ | older | N/A | Best of luck to you! | Please upgrade! | |
|
302
405
|
|
303
406
|
NOTE: The 1.4 series will only receive critical security updates.
|
304
407
|
See [SECURITY.md][🚎sec-pol]
|
@@ -307,7 +410,7 @@ See [SECURITY.md][🚎sec-pol]
|
|
307
410
|
|
308
411
|
### Global Configuration
|
309
412
|
|
310
|
-
If you started seeing this warning, but everything
|
413
|
+
If you started seeing this warning, but everything is working fine, you can now silence it.
|
311
414
|
```log
|
312
415
|
OAuth2::AccessToken.from_hash: `hash` contained more than one 'token' key
|
313
416
|
```
|
@@ -315,20 +418,34 @@ OAuth2::AccessToken.from_hash: `hash` contained more than one 'token' key
|
|
315
418
|
```ruby
|
316
419
|
OAuth2.configure do |config|
|
317
420
|
config.silence_extra_tokens_warning = true # default: false
|
421
|
+
config.silence_no_tokens_warning = true # default: false, if you want to also silence warnings about no tokens
|
318
422
|
end
|
319
423
|
```
|
320
424
|
|
425
|
+
This comes from ambiguity in the spec about which token is the right token.
|
426
|
+
Some OAuth 2.0 standards legitimately have multiple tokens.
|
427
|
+
You may need to subclass `OAuth2::AccessToken`, or write your own custom alternative to it, and pass it in.
|
428
|
+
Specify your custom class with the `access_token_class` option.
|
429
|
+
|
430
|
+
If you only need one token you can, as of v2.0.10,
|
431
|
+
specify the exact token name you want to extract via the `OAuth2::AccessToken` using
|
432
|
+
the `token_name` option.
|
433
|
+
|
434
|
+
You'll likely need to do some source diving.
|
435
|
+
This gem has 100% test coverage for lines and branches, so the specs are a great place to look for ideas.
|
436
|
+
If you have time and energy please contribute to the documentation!
|
437
|
+
|
321
438
|
### `authorize_url` and `token_url` are on site root (Just Works!)
|
322
439
|
|
323
440
|
```ruby
|
324
|
-
require
|
325
|
-
client = OAuth2::Client.new(
|
441
|
+
require "oauth2"
|
442
|
+
client = OAuth2::Client.new("client_id", "client_secret", site: "https://example.org")
|
326
443
|
# => #<OAuth2::Client:0x00000001204c8288 @id="client_id", @secret="client_sec...
|
327
|
-
client.auth_code.authorize_url(redirect_uri:
|
444
|
+
client.auth_code.authorize_url(redirect_uri: "http://localhost:8080/oauth2/callback")
|
328
445
|
# => "https://example.org/oauth/authorize?client_id=client_id&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Foauth2%2Fcallback&response_type=code"
|
329
446
|
|
330
|
-
access = client.auth_code.get_token(
|
331
|
-
response = access.get(
|
447
|
+
access = client.auth_code.get_token("authorization_code_value", redirect_uri: "http://localhost:8080/oauth2/callback", headers: {"Authorization" => "Basic some_password"})
|
448
|
+
response = access.get("/api/resource", params: {"query_foo" => "bar"})
|
332
449
|
response.class.name
|
333
450
|
# => OAuth2::Response
|
334
451
|
```
|
@@ -338,9 +455,9 @@ response.class.name
|
|
338
455
|
In above example, the default Authorization URL is `oauth/authorize` and default Access Token URL is `oauth/token`, and, as they are missing a leading `/`, both are relative.
|
339
456
|
|
340
457
|
```ruby
|
341
|
-
client = OAuth2::Client.new(
|
458
|
+
client = OAuth2::Client.new("client_id", "client_secret", site: "https://example.org/nested/directory/on/your/server")
|
342
459
|
# => #<OAuth2::Client:0x00000001204c8288 @id="client_id", @secret="client_sec...
|
343
|
-
client.auth_code.authorize_url(redirect_uri:
|
460
|
+
client.auth_code.authorize_url(redirect_uri: "http://localhost:8080/oauth2/callback")
|
344
461
|
# => "https://example.org/nested/directory/on/your/server/oauth/authorize?client_id=client_id&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Foauth2%2Fcallback&response_type=code"
|
345
462
|
```
|
346
463
|
|
@@ -349,12 +466,15 @@ client.auth_code.authorize_url(redirect_uri: 'http://localhost:8080/oauth2/callb
|
|
349
466
|
You can specify custom URLs for authorization and access token, and when using a leading `/` they will _not be relative_, as shown below:
|
350
467
|
|
351
468
|
```ruby
|
352
|
-
client = OAuth2::Client.new(
|
353
|
-
|
354
|
-
|
355
|
-
|
469
|
+
client = OAuth2::Client.new(
|
470
|
+
"client_id",
|
471
|
+
"client_secret",
|
472
|
+
site: "https://example.org/nested/directory/on/your/server",
|
473
|
+
authorize_url: "/jaunty/authorize/",
|
474
|
+
token_url: "/stirrups/access_token",
|
475
|
+
)
|
356
476
|
# => #<OAuth2::Client:0x00000001204c8288 @id="client_id", @secret="client_sec...
|
357
|
-
client.auth_code.authorize_url(redirect_uri:
|
477
|
+
client.auth_code.authorize_url(redirect_uri: "http://localhost:8080/oauth2/callback")
|
358
478
|
# => "https://example.org/jaunty/authorize/?client_id=client_id&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Foauth2%2Fcallback&response_type=code"
|
359
479
|
client.class.name
|
360
480
|
# => OAuth2::Client
|
@@ -363,7 +483,7 @@ client.class.name
|
|
363
483
|
### snake_case and indifferent access in Response#parsed
|
364
484
|
|
365
485
|
```ruby
|
366
|
-
response = access.get(
|
486
|
+
response = access.get("/api/resource", params: {"query_foo" => "bar"})
|
367
487
|
# Even if the actual response is CamelCase. it will be made available as snaky:
|
368
488
|
JSON.parse(response.body) # => {"accessToken"=>"aaaaaaaa", "additionalData"=>"additional"}
|
369
489
|
response.parsed # => {"access_token"=>"aaaaaaaa", "additional_data"=>"additional"}
|
@@ -377,11 +497,11 @@ response.parsed.class.name # => OAuth2::SnakyHash (subclass of Hashie::Ma
|
|
377
497
|
#### What if I hate snakes and/or indifference?
|
378
498
|
|
379
499
|
```ruby
|
380
|
-
response = access.get(
|
500
|
+
response = access.get("/api/resource", params: {"query_foo" => "bar"}, snaky: false)
|
381
501
|
JSON.parse(response.body) # => {"accessToken"=>"aaaaaaaa", "additionalData"=>"additional"}
|
382
502
|
response.parsed # => {"accessToken"=>"aaaaaaaa", "additionalData"=>"additional"}
|
383
|
-
response.parsed[
|
384
|
-
response.parsed[
|
503
|
+
response.parsed["accessToken"] # => "aaaaaaaa"
|
504
|
+
response.parsed["additionalData"] # => "additional"
|
385
505
|
response.parsed.class.name # => Hash (just, regular old Hash)
|
386
506
|
```
|
387
507
|
|
@@ -392,19 +512,19 @@ Set an environment variable, however you would [normally do that](https://github
|
|
392
512
|
|
393
513
|
```ruby
|
394
514
|
# will log both request and response, including bodies
|
395
|
-
ENV[
|
515
|
+
ENV["OAUTH_DEBUG"] = "true"
|
396
516
|
```
|
397
517
|
|
398
518
|
By default, debug output will go to `$stdout`. This can be overridden when
|
399
519
|
initializing your OAuth2::Client.
|
400
520
|
|
401
521
|
```ruby
|
402
|
-
require
|
522
|
+
require "oauth2"
|
403
523
|
client = OAuth2::Client.new(
|
404
|
-
|
405
|
-
|
406
|
-
site:
|
407
|
-
logger: Logger.new(
|
524
|
+
"client_id",
|
525
|
+
"client_secret",
|
526
|
+
site: "https://example.org",
|
527
|
+
logger: Logger.new("example.log", "weekly"),
|
408
528
|
)
|
409
529
|
```
|
410
530
|
</details>
|
@@ -453,96 +573,350 @@ use. They are available via the [`#auth_code`](https://gitlab.com/oauth-xx/oauth
|
|
453
573
|
|
454
574
|
These aren't full examples, but demonstrative of the differences between usage for each strategy.
|
455
575
|
```ruby
|
456
|
-
auth_url = client.auth_code.authorize_url(redirect_uri:
|
457
|
-
access = client.auth_code.get_token(
|
576
|
+
auth_url = client.auth_code.authorize_url(redirect_uri: "http://localhost:8080/oauth/callback")
|
577
|
+
access = client.auth_code.get_token("code_value", redirect_uri: "http://localhost:8080/oauth/callback")
|
458
578
|
|
459
|
-
auth_url = client.implicit.authorize_url(redirect_uri:
|
579
|
+
auth_url = client.implicit.authorize_url(redirect_uri: "http://localhost:8080/oauth/callback")
|
460
580
|
# get the token params in the callback and
|
461
581
|
access = OAuth2::AccessToken.from_kvform(client, query_string)
|
462
582
|
|
463
|
-
access = client.password.get_token(
|
583
|
+
access = client.password.get_token("username", "password")
|
464
584
|
|
465
585
|
access = client.client_credentials.get_token
|
466
586
|
|
467
587
|
# Client Assertion Strategy
|
468
588
|
# see: https://tools.ietf.org/html/rfc7523
|
469
589
|
claimset = {
|
470
|
-
iss:
|
471
|
-
aud:
|
472
|
-
sub:
|
590
|
+
iss: "http://localhost:3001",
|
591
|
+
aud: "http://localhost:8080/oauth2/token",
|
592
|
+
sub: "me@example.com",
|
473
593
|
exp: Time.now.utc.to_i + 3600,
|
474
594
|
}
|
475
|
-
assertion_params = [claimset,
|
595
|
+
assertion_params = [claimset, "HS256", "secret_key"]
|
476
596
|
access = client.assertion.get_token(assertion_params)
|
477
597
|
|
478
598
|
# The `access` (i.e. access token) is then used like so:
|
479
599
|
access.token # actual access_token string, if you need it somewhere
|
480
|
-
access.get(
|
600
|
+
access.get("/api/stuff") # making api calls with access token
|
481
601
|
```
|
482
602
|
|
483
603
|
If you want to specify additional headers to be sent out with the
|
484
604
|
request, add a 'headers' hash under 'params':
|
485
605
|
|
486
606
|
```ruby
|
487
|
-
access = client.auth_code.get_token(
|
607
|
+
access = client.auth_code.get_token("code_value", redirect_uri: "http://localhost:8080/oauth/callback", headers: {"Some" => "Header"})
|
488
608
|
```
|
489
609
|
|
490
610
|
You can always use the `#request` method on the `OAuth2::Client` instance to make
|
491
611
|
requests for tokens for any Authentication grant type.
|
492
612
|
|
493
|
-
|
613
|
+
### 🚀 Release Instructions
|
614
|
+
|
615
|
+
See [CONTRIBUTING.md][🤝contributing].
|
616
|
+
|
617
|
+
## 🔐 Security
|
618
|
+
|
619
|
+
See [SECURITY.md][🔐security].
|
620
|
+
|
621
|
+
## 🤝 Contributing
|
622
|
+
|
623
|
+
If you need some ideas of where to help, you could work on adding more code coverage,
|
624
|
+
or if it is already 💯 (see [below](#code-coverage)) check TODOs (see [below](#todos)),
|
625
|
+
or check [issues][🤝issues], or [PRs][🤝pulls],
|
626
|
+
or use the gem and think about how it could be better.
|
627
|
+
|
628
|
+
We [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] so if you make changes, remember to update it.
|
629
|
+
|
630
|
+
See [CONTRIBUTING.md][🤝contributing] for more detailed instructions.
|
631
|
+
|
632
|
+
### Code Coverage
|
633
|
+
|
634
|
+
[![Coveralls Test Coverage][🔑coveralls-img]][🔑coveralls]
|
635
|
+
[![QLTY Test Coverage][🔑cc-covi♻️]][🔑cc-cov]
|
636
|
+
|
637
|
+
### 🪇 Code of Conduct
|
638
|
+
|
639
|
+
Everyone interacting in this project's codebases, issue trackers,
|
640
|
+
chat rooms and mailing lists is expected to follow the [![Contributor Covenant 2.1][🪇conduct-img]][🪇conduct].
|
641
|
+
|
642
|
+
## 🌈 Contributors
|
643
|
+
|
644
|
+
[![Contributors][🖐contributors-img]][🖐contributors]
|
494
645
|
|
495
|
-
|
496
|
-
Violations of this scheme should be reported as bugs. Specifically,
|
497
|
-
if a minor or patch version is released that breaks backward
|
498
|
-
compatibility, a new version should be immediately released that
|
499
|
-
restores compatibility. Breaking changes to the public API will
|
500
|
-
only be introduced with new major versions.
|
646
|
+
Made with [contributors-img][🖐contrib-rocks].
|
501
647
|
|
502
|
-
|
503
|
-
|
648
|
+
Also see GitLab Contributors: [https://gitlab.com/oauth-xx/oauth2/-/graphs/main][🚎contributors-gl]
|
649
|
+
|
650
|
+
## ⭐️ Star History
|
651
|
+
|
652
|
+
<a href="https://star-history.com/#oauth-xx/oauth2&Date">
|
653
|
+
<picture>
|
654
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=oauth-xx/oauth2&type=Date&theme=dark" />
|
655
|
+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=oauth-xx/oauth2&type=Date" />
|
656
|
+
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=oauth-xx/oauth2&type=Date" />
|
657
|
+
</picture>
|
658
|
+
</a>
|
659
|
+
|
660
|
+
## 📌 Versioning
|
661
|
+
|
662
|
+
This Library adheres to [![Semantic Versioning 2.0.0][📌semver-img]][📌semver].
|
663
|
+
Violations of this scheme should be reported as bugs.
|
664
|
+
Specifically, if a minor or patch version is released that breaks backward compatibility,
|
665
|
+
a new version should be immediately released that restores compatibility.
|
666
|
+
Breaking changes to the public API will only be introduced with new major versions.
|
667
|
+
|
668
|
+
### 📌 Is "Platform Support" part of the public API?
|
669
|
+
|
670
|
+
Yes. But I'm obligated to include notes...
|
671
|
+
|
672
|
+
SemVer should, but doesn't explicitly, say that dropping support for specific Platforms
|
673
|
+
is a *breaking change* to an API.
|
674
|
+
It is obvious to many, but not all, and since the spec is silent, the bike shedding is endless.
|
675
|
+
|
676
|
+
> dropping support for a platform is both obviously and objectively a breaking change
|
677
|
+
|
678
|
+
- Jordan Harband (@ljharb, maintainer of SemVer) [in SemVer issue 716][📌semver-breaking]
|
679
|
+
|
680
|
+
To get a better understanding of how SemVer is intended to work over a project's lifetime,
|
681
|
+
read this article from the creator of SemVer:
|
682
|
+
|
683
|
+
- ["Major Version Numbers are Not Sacred"][📌major-versions-not-sacred]
|
684
|
+
|
685
|
+
As a result of this policy, and the interpretive lens used by the maintainer,
|
686
|
+
you can (and should) specify a dependency on these libraries using
|
687
|
+
the [Pessimistic Version Constraint][📌pvc] with two digits of precision.
|
504
688
|
|
505
689
|
For example:
|
506
690
|
|
507
691
|
```ruby
|
508
|
-
spec.add_dependency
|
692
|
+
spec.add_dependency("oauth2", "~> 2.0")
|
509
693
|
```
|
510
694
|
|
511
|
-
[
|
512
|
-
[pvc]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint
|
513
|
-
|
514
|
-
## License
|
695
|
+
See [CHANGELOG.md][📌changelog] for list of releases.
|
515
696
|
|
516
|
-
|
697
|
+
## 📄 License
|
517
698
|
|
518
|
-
|
519
|
-
|
520
|
-
|
699
|
+
The gem is available as open source under the terms of
|
700
|
+
the [MIT License][📄license] [![License: MIT][📄license-img]][📄license-ref].
|
701
|
+
See [LICENSE.txt][📄license] for the official [Copyright Notice][📄copyright-notice-explainer].
|
521
702
|
|
522
|
-
[![FOSSA Status]
|
703
|
+
[![FOSSA Status][fossa2-img])][fossa2]
|
523
704
|
|
524
|
-
[license]: https://gitlab.com/oauth-xx/oauth2/-/blob/main/LICENSE
|
525
|
-
[oauth-xx]: https://gitlab.com/oauth-xx
|
526
705
|
[fossa2]: https://app.fossa.io/projects/git%2Bgithub.com%2Foauth-xx%2Foauth2?ref=badge_large
|
706
|
+
[fossa2-img]: https://app.fossa.io/api/projects/git%2Bgithub.com%2Foauth-xx%2Foauth2.svg?type=large
|
707
|
+
|
708
|
+
### © Copyright
|
709
|
+
|
710
|
+
<ul>
|
711
|
+
<li>
|
712
|
+
2017 - 2025 Peter H. Boling, of
|
713
|
+
<a href="https://railsbling.com">
|
714
|
+
RailsBling.com
|
715
|
+
<picture>
|
716
|
+
<img alt="Rails Bling" height="20" src="https://railsbling.com/images/logos/RailsBling-TrainLogo.svg" />
|
717
|
+
</picture>
|
718
|
+
</a>, and oauth2 contributors
|
719
|
+
</li>
|
720
|
+
<li>
|
721
|
+
Copyright (c) 2011 - 2013 Michael Bleigh and Intridea, Inc.
|
722
|
+
</li>
|
723
|
+
</ul>
|
724
|
+
|
725
|
+
## 🤑 One more thing
|
726
|
+
|
727
|
+
You made it to the bottom of the page,
|
728
|
+
so perhaps you'll indulge me for another 20 seconds.
|
729
|
+
I maintain many dozens of gems, including this one,
|
730
|
+
because I want Ruby to be a great place for people to solve problems, big and small.
|
731
|
+
Please consider supporting my efforts via the giant yellow link below,
|
732
|
+
or one of the others at the head of this README.
|
733
|
+
|
734
|
+
[![Buy me a latte][🖇buyme-img]][🖇buyme]
|
527
735
|
|
528
|
-
|
529
|
-
|
530
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
531
|
-
|
532
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
736
|
+
[⛳gg-discussions]: https://groups.google.com/g/oauth-ruby
|
737
|
+
[⛳gg-discussions-img]: https://img.shields.io/badge/google-group-purple.svg?style=flat
|
533
738
|
|
534
|
-
|
739
|
+
[✇bundle-group-pattern]: https://gist.github.com/pboling/4564780
|
740
|
+
[⛳️gem-namespace]: https://github.com/oauth-xx/oauth2
|
741
|
+
[⛳️namespace-img]: https://img.shields.io/badge/namespace-OAuth2-brightgreen.svg?style=flat&logo=ruby&logoColor=white
|
742
|
+
[⛳️gem-name]: https://rubygems.org/gems/oauth2
|
743
|
+
[⛳️name-img]: https://img.shields.io/badge/name-oauth2-brightgreen.svg?style=flat&logo=rubygems&logoColor=red
|
744
|
+
[🚂bdfl-blog]: http://www.railsbling.com/tags/oauth2
|
745
|
+
[🚂bdfl-blog-img]: https://img.shields.io/badge/blog-railsbling-0093D0.svg?style=for-the-badge&logo=rubyonrails&logoColor=orange
|
746
|
+
[🚂bdfl-contact]: http://www.railsbling.com/contact
|
747
|
+
[🚂bdfl-contact-img]: https://img.shields.io/badge/Contact-BDFL-0093D0.svg?style=flat&logo=rubyonrails&logoColor=red
|
748
|
+
[💖🖇linkedin]: http://www.linkedin.com/in/peterboling
|
749
|
+
[💖🖇linkedin-img]: https://img.shields.io/badge/PeterBoling-LinkedIn-0B66C2?style=flat&logo=newjapanprowrestling
|
750
|
+
[💖✌️wellfound]: https://angel.co/u/peter-boling
|
751
|
+
[💖✌️wellfound-img]: https://img.shields.io/badge/peter--boling-orange?style=flat&logo=wellfound
|
752
|
+
[💖💲crunchbase]: https://www.crunchbase.com/person/peter-boling
|
753
|
+
[💖💲crunchbase-img]: https://img.shields.io/badge/peter--boling-purple?style=flat&logo=crunchbase
|
754
|
+
[💖🐘ruby-mast]: https://ruby.social/@galtzo
|
755
|
+
[💖🐘ruby-mast-img]: https://img.shields.io/mastodon/follow/109447111526622197?domain=https%3A%2F%2Fruby.social&style=flat&logo=mastodon&label=Ruby%20%40galtzo
|
756
|
+
[💖🦋bluesky]: https://bsky.app/profile/galtzo.com
|
757
|
+
[💖🦋bluesky-img]: https://img.shields.io/badge/@galtzo.com-0285FF?style=flat&logo=bluesky&logoColor=white
|
758
|
+
[💖🌳linktree]: https://linktr.ee/galtzo
|
759
|
+
[💖🌳linktree-img]: https://img.shields.io/badge/galtzo-purple?style=flat&logo=linktree
|
760
|
+
[💖💁🏼♂️devto]: https://dev.to/galtzo
|
761
|
+
[💖💁🏼♂️devto-img]: https://img.shields.io/badge/dev.to-0A0A0A?style=flat&logo=devdotto&logoColor=white
|
762
|
+
[💖💁🏼♂️aboutme]: https://about.me/peter.boling
|
763
|
+
[💖💁🏼♂️aboutme-img]: https://img.shields.io/badge/about.me-0A0A0A?style=flat&logo=aboutme&logoColor=white
|
764
|
+
[💖🧊berg]: https://codeberg.org/pboling
|
765
|
+
[💖🐙hub]: https://github.org/pboling
|
766
|
+
[💖🛖hut]: https://sr.ht/~galtzo/
|
767
|
+
[💖🧪lab]: https://gitlab.com/pboling
|
768
|
+
[👨🏼🏫expsup-upwork]: https://www.upwork.com/freelancers/~014942e9b056abdf86?mp_source=share
|
769
|
+
[👨🏼🏫expsup-upwork-img]: https://img.shields.io/badge/UpWork-13544E?style=for-the-badge&logo=Upwork&logoColor=white
|
770
|
+
[👨🏼🏫expsup-codementor]: https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github
|
771
|
+
[👨🏼🏫expsup-codementor-img]: https://img.shields.io/badge/CodeMentor-Get_Help-1abc9c?style=for-the-badge&logo=CodeMentor&logoColor=white
|
772
|
+
[🏙️entsup-tidelift]: https://tidelift.com/subscription
|
773
|
+
[🏙️entsup-tidelift-img]: https://img.shields.io/badge/Tidelift_and_Sonar-Enterprise_Support-FD3456?style=for-the-badge&logo=sonar&logoColor=white
|
774
|
+
[🏙️entsup-tidelift-sonar]: https://blog.tidelift.com/tidelift-joins-sonar
|
775
|
+
[💁🏼♂️peterboling]: http://www.peterboling.com
|
776
|
+
[🚂railsbling]: http://www.railsbling.com
|
777
|
+
[📜src-gl-img]: https://img.shields.io/badge/GitLab-FBA326?style=for-the-badge&logo=Gitlab&logoColor=orange
|
778
|
+
[📜src-gl]: https://gitlab.com/oauth-xx/oauth2/
|
779
|
+
[📜src-cb-img]: https://img.shields.io/badge/CodeBerg-4893CC?style=for-the-badge&logo=CodeBerg&logoColor=blue
|
780
|
+
[📜src-cb]: https://codeberg.org/oauth-xx/oauth2
|
781
|
+
[📜src-gh-img]: https://img.shields.io/badge/GitHub-238636?style=for-the-badge&logo=Github&logoColor=green
|
782
|
+
[📜src-gh]: https://github.com/oauth-xx/oauth2
|
783
|
+
[📜docs-cr-rd-img]: https://img.shields.io/badge/RubyDoc-Current_Release-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white
|
784
|
+
[📜docs-head-rd-img]: https://img.shields.io/badge/RubyDoc-HEAD-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white
|
785
|
+
[📜wiki]: https://gitlab.com/oauth-xx/oauth2/-/wikis/home
|
786
|
+
[📜wiki-img]: https://img.shields.io/badge/wiki-examples-943CD2.svg?style=for-the-badge&logo=Wiki&logoColor=white
|
787
|
+
[👽dl-rank]: https://rubygems.org/gems/oauth2
|
788
|
+
[👽dl-ranki]: https://img.shields.io/gem/rd/oauth2.svg
|
789
|
+
[👽oss-help]: https://www.codetriage.com/oauth-xx/oauth2
|
790
|
+
[👽oss-helpi]: https://www.codetriage.com/oauth-xx/oauth2/badges/users.svg
|
791
|
+
[👽version]: https://rubygems.org/gems/oauth2
|
792
|
+
[👽versioni]: https://img.shields.io/gem/v/oauth2.svg
|
793
|
+
[🔑cc-mnt]: https://qlty.sh/gh/oauth-xx/projects/oauth2
|
794
|
+
[🔑cc-mnti♻️]: https://qlty.sh/badges/d3370c2c-8791-4202-9759-76f527f76005/maintainability.svg
|
795
|
+
[🔑cc-cov]: https://qlty.sh/gh/oauth-xx/projects/oauth2
|
796
|
+
[🔑cc-covi♻️]: https://qlty.sh/badges/d3370c2c-8791-4202-9759-76f527f76005/test_coverage.svg
|
797
|
+
[🔑codecov]: https://codecov.io/gh/oauth-xx/oauth2
|
798
|
+
[🔑codecovi♻️]: https://codecov.io/gh/oauth-xx/oauth2/graph/badge.svg?token=bNqSzNiuo2
|
799
|
+
[🔑coveralls]: https://coveralls.io/github/oauth-xx/oauth2?branch=main
|
800
|
+
[🔑coveralls-img]: https://coveralls.io/repos/github/oauth-xx/oauth2/badge.svg?branch=main
|
801
|
+
[🔑depfu]: https://depfu.com/github/oauth-xx/oauth2?project_id=5884
|
802
|
+
[🔑depfui♻️]: https://badges.depfu.com/badges/6d34dc1ba682bbdf9ae2a97848241743/count.svg
|
803
|
+
[🖐codeQL]: https://github.com/oauth-xx/oauth2/security/code-scanning
|
804
|
+
[🖐codeQL-img]: https://github.com/oauth-xx/oauth2/actions/workflows/codeql-analysis.yml/badge.svg
|
805
|
+
[🚎1-an-wf]: https://github.com/oauth-xx/oauth2/actions/workflows/ancient.yml
|
806
|
+
[🚎1-an-wfi]: https://github.com/oauth-xx/oauth2/actions/workflows/ancient.yml/badge.svg
|
807
|
+
[🚎2-cov-wf]: https://github.com/oauth-xx/oauth2/actions/workflows/coverage.yml
|
808
|
+
[🚎2-cov-wfi]: https://github.com/oauth-xx/oauth2/actions/workflows/coverage.yml/badge.svg
|
809
|
+
[🚎3-hd-wf]: https://github.com/oauth-xx/oauth2/actions/workflows/heads.yml
|
810
|
+
[🚎3-hd-wfi]: https://github.com/oauth-xx/oauth2/actions/workflows/heads.yml/badge.svg
|
811
|
+
[🚎4-lg-wf]: https://github.com/oauth-xx/oauth2/actions/workflows/legacy.yml
|
812
|
+
[🚎4-lg-wfi]: https://github.com/oauth-xx/oauth2/actions/workflows/legacy.yml/badge.svg
|
813
|
+
[🚎5-st-wf]: https://github.com/oauth-xx/oauth2/actions/workflows/style.yml
|
814
|
+
[🚎5-st-wfi]: https://github.com/oauth-xx/oauth2/actions/workflows/style.yml/badge.svg
|
815
|
+
[🚎6-s-wf]: https://github.com/oauth-xx/oauth2/actions/workflows/supported.yml
|
816
|
+
[🚎6-s-wfi]: https://github.com/oauth-xx/oauth2/actions/workflows/supported.yml/badge.svg
|
817
|
+
[🚎7-us-wf]: https://github.com/oauth-xx/oauth2/actions/workflows/unsupported.yml
|
818
|
+
[🚎7-us-wfi]: https://github.com/oauth-xx/oauth2/actions/workflows/unsupported.yml/badge.svg
|
819
|
+
[🚎8-ho-wf]: https://github.com/oauth-xx/oauth2/actions/workflows/hoary.yml
|
820
|
+
[🚎8-ho-wfi]: https://github.com/oauth-xx/oauth2/actions/workflows/hoary.yml/badge.svg
|
821
|
+
[🚎9-t-wf]: https://github.com/oauth-xx/oauth2/actions/workflows/truffle.yml
|
822
|
+
[🚎9-t-wfi]: https://github.com/oauth-xx/oauth2/actions/workflows/truffle.yml/badge.svg
|
823
|
+
[🚎10-j-wf]: https://github.com/oauth-xx/oauth2/actions/workflows/jruby.yml
|
824
|
+
[🚎10-j-wfi]: https://github.com/oauth-xx/oauth2/actions/workflows/jruby.yml/badge.svg
|
825
|
+
[🚎11-c-wf]: https://github.com/oauth-xx/oauth2/actions/workflows/current.yml
|
826
|
+
[🚎11-c-wfi]: https://github.com/oauth-xx/oauth2/actions/workflows/current.yml/badge.svg
|
827
|
+
[🚎12-crh-wf]: https://github.com/oauth-xx/oauth2/actions/workflows/current-runtime-heads.yml
|
828
|
+
[🚎12-crh-wfi]: https://github.com/oauth-xx/oauth2/actions/workflows/current-runtime-heads.yml/badge.svg
|
829
|
+
[⛳liberapay-img]: https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay
|
830
|
+
[⛳liberapay]: https://liberapay.com/pboling/donate
|
831
|
+
[🖇sponsor-img]: https://img.shields.io/badge/Sponsor_Me!-pboling.svg?style=social&logo=github
|
832
|
+
[🖇sponsor]: https://github.com/sponsors/pboling
|
833
|
+
[🖇polar-img]: https://img.shields.io/badge/polar-donate-yellow.svg
|
834
|
+
[🖇polar]: https://polar.sh/pboling
|
835
|
+
[🖇kofi-img]: https://img.shields.io/badge/a_more_different_coffee-✓-yellow.svg
|
836
|
+
[🖇kofi]: https://ko-fi.com/O5O86SNP4
|
837
|
+
[🖇patreon-img]: https://img.shields.io/badge/patreon-donate-yellow.svg
|
838
|
+
[🖇patreon]: https://patreon.com/galtzo
|
839
|
+
[🖇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
|
840
|
+
[🖇buyme]: https://www.buymeacoffee.com/pboling
|
841
|
+
[🖇buyme-small-img]: https://img.shields.io/badge/buy_me_a_coffee-✓-yellow.svg?style=flat
|
842
|
+
[💎ruby-2.3i]: https://img.shields.io/badge/Ruby-2.3-DF00CA?style=for-the-badge&logo=ruby&logoColor=white
|
843
|
+
[💎ruby-2.4i]: https://img.shields.io/badge/Ruby-2.4-DF00CA?style=for-the-badge&logo=ruby&logoColor=white
|
844
|
+
[💎ruby-2.5i]: https://img.shields.io/badge/Ruby-2.5-DF00CA?style=for-the-badge&logo=ruby&logoColor=white
|
845
|
+
[💎ruby-2.6i]: https://img.shields.io/badge/Ruby-2.6-DF00CA?style=for-the-badge&logo=ruby&logoColor=white
|
846
|
+
[💎ruby-2.7i]: https://img.shields.io/badge/Ruby-2.7-DF00CA?style=for-the-badge&logo=ruby&logoColor=white
|
847
|
+
[💎ruby-3.0i]: https://img.shields.io/badge/Ruby-3.0-CC342D?style=for-the-badge&logo=ruby&logoColor=white
|
848
|
+
[💎ruby-3.1i]: https://img.shields.io/badge/Ruby-3.1-CC342D?style=for-the-badge&logo=ruby&logoColor=white
|
849
|
+
[💎ruby-3.2i]: https://img.shields.io/badge/Ruby-3.2-CC342D?style=for-the-badge&logo=ruby&logoColor=white
|
850
|
+
[💎ruby-3.3i]: https://img.shields.io/badge/Ruby-3.3-CC342D?style=for-the-badge&logo=ruby&logoColor=white
|
851
|
+
[💎ruby-c-i]: https://img.shields.io/badge/Ruby-current-CC342D?style=for-the-badge&logo=ruby&logoColor=green
|
852
|
+
[💎ruby-headi]: https://img.shields.io/badge/Ruby-HEAD-CC342D?style=for-the-badge&logo=ruby&logoColor=blue
|
853
|
+
[💎truby-22.3i]: https://img.shields.io/badge/Truffle_Ruby-22.3-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
854
|
+
[💎truby-23.0i]: https://img.shields.io/badge/Truffle_Ruby-23.0-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
855
|
+
[💎truby-23.1i]: https://img.shields.io/badge/Truffle_Ruby-23.1-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
|
856
|
+
[💎truby-c-i]: https://img.shields.io/badge/Truffle_Ruby-current-34BCB1?style=for-the-badge&logo=ruby&logoColor=green
|
857
|
+
[💎truby-headi]: https://img.shields.io/badge/Truffle_Ruby-HEAD-34BCB1?style=for-the-badge&logo=ruby&logoColor=blue
|
858
|
+
[💎jruby-9.1i]: https://img.shields.io/badge/JRuby-9.1-FBE742?style=for-the-badge&logo=ruby&logoColor=red
|
859
|
+
[💎jruby-9.2i]: https://img.shields.io/badge/JRuby-9.2-FBE742?style=for-the-badge&logo=ruby&logoColor=red
|
860
|
+
[💎jruby-9.3i]: https://img.shields.io/badge/JRuby-9.3-FBE742?style=for-the-badge&logo=ruby&logoColor=red
|
861
|
+
[💎jruby-9.4i]: https://img.shields.io/badge/JRuby-9.4-FBE742?style=for-the-badge&logo=ruby&logoColor=red
|
862
|
+
[💎jruby-c-i]: https://img.shields.io/badge/JRuby-current-FBE742?style=for-the-badge&logo=ruby&logoColor=green
|
863
|
+
[💎jruby-headi]: https://img.shields.io/badge/JRuby-HEAD-FBE742?style=for-the-badge&logo=ruby&logoColor=blue
|
864
|
+
[🤝issues]: https://github.com/oauth-xx/oauth2/issues
|
865
|
+
[🤝pulls]: https://github.com/oauth-xx/oauth2/pulls
|
866
|
+
[🤝contributing]: CONTRIBUTING.md
|
867
|
+
[🔑codecov-g♻️]: https://codecov.io/gh/oauth-xx/oauth2/graphs/tree.svg?token=bNqSzNiuo2
|
868
|
+
[🖐contrib-rocks]: https://contrib.rocks
|
869
|
+
[🖐contributors]: https://github.com/oauth-xx/oauth2/graphs/contributors
|
870
|
+
[🖐contributors-img]: https://contrib.rocks/image?repo=oauth-xx/oauth2
|
871
|
+
[🚎contributors-gl]: https://gitlab.com/oauth-xx/oauth2/-/graphs/main
|
872
|
+
[🪇conduct]: CODE_OF_CONDUCT.md
|
873
|
+
[🪇conduct-img]: https://img.shields.io/badge/Contributor_Covenant-2.1-4baaaa.svg
|
874
|
+
[📌pvc]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint
|
875
|
+
[📌semver]: https://semver.org/spec/v2.0.0.html
|
876
|
+
[📌semver-img]: https://img.shields.io/badge/semver-2.0.0-FFDD67.svg?style=flat
|
877
|
+
[📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139
|
878
|
+
[📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
|
879
|
+
[📌changelog]: CHANGELOG.md
|
880
|
+
[📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
|
881
|
+
[📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-FFDD67.svg?style=flat
|
882
|
+
[📌gitmoji]:https://gitmoji.dev
|
883
|
+
[📌gitmoji-img]:https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67.svg?style=flat-square
|
884
|
+
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
885
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.518-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
886
|
+
[🔐security]: SECURITY.md
|
887
|
+
[🔐security-img]: https://img.shields.io/badge/security-policy-brightgreen.svg?style=flat
|
888
|
+
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
889
|
+
[📄license]: LICENSE.txt
|
890
|
+
[📄license-ref]: https://opensource.org/licenses/MIT
|
891
|
+
[📄license-img]: https://img.shields.io/badge/License-MIT-green.svg
|
892
|
+
[📄ilo-declaration]: https://www.ilo.org/declaration/lang--en/index.htm
|
893
|
+
[📄ilo-declaration-img]: https://img.shields.io/badge/ILO_Fundamental_Principles-✓-brightgreen.svg?style=flat
|
894
|
+
[🚎yard-current]: http://rubydoc.info/gems/oauth2
|
895
|
+
[🚎yard-head]: https://rubydoc.info/github/oauth-xx/oauth2/main
|
896
|
+
[💎stone_checksums]: https://github.com/pboling/stone_checksums
|
897
|
+
[💎SHA_checksums]: https://gitlab.com/oauth-xx/oauth2/-/tree/main/checksums
|
898
|
+
[💎rlts]: https://github.com/rubocop-lts/rubocop-lts
|
899
|
+
[💎rlts-img]: https://img.shields.io/badge/code_style-rubocop--lts-brightgreen.svg?plastic&logo=ruby&logoColor=white
|
900
|
+
[🏘fossa]: https://app.fossa.io/projects/git%2Bgithub.com%2Foauth-xx%2Foauth2?ref=badge_shield
|
901
|
+
[🏘fossa-img]: https://app.fossa.io/api/projects/git%2Bgithub.com%2Foauth-xx%2Foauth2.svg?type=shield
|
902
|
+
[💎d-in-dvcs]: https://railsbling.com/posts/dvcs/put_the_d_in_dvcs/
|
535
903
|
|
536
|
-
|
904
|
+
<details>
|
905
|
+
<summary>
|
906
|
+
rel="me" Social Proofs
|
907
|
+
</summary>
|
537
908
|
|
538
|
-
|
909
|
+
<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>
|
910
|
+
<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>
|
911
|
+
</details>
|
539
912
|
|
540
|
-
|
913
|
+
<details>
|
914
|
+
<summary>Deprecated Badges</summary>
|
541
915
|
|
542
|
-
|
916
|
+
CodeCov currently fails to parse the coverage upload.
|
543
917
|
|
544
|
-
|
918
|
+
[![CodeCov Test Coverage][🔑codecovi♻️]][🔑codecov]
|
545
919
|
|
546
|
-
|
920
|
+
[![Coverage Graph][🔑codecov-g♻️]][🔑codecov]
|
547
921
|
|
548
|
-
|
922
|
+
</details>
|