You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* NOTE: This gem may still _install_ and _run_ on ruby v2.2, but vanilla GitHub Actions no longer supports testing against it, so YMMV. Accept patches so long as they don't break the platforms that do run in CI.
150
151
* JRuby @ v9.4, v10.0, HEAD
@@ -213,7 +214,7 @@ The various versions of each are tested via the Ruby test matrix, along with wha
213
214
* time
214
215
* logger (removed from stdlib in Ruby 3.5 so added as runtime dependency in v2.0.10)
215
216
216
-
If you use a gem version of a core Ruby library it should work fine!
217
+
If you use a gem version of a core Ruby library, it should work fine!
217
218
218
219
</details>
219
220
@@ -413,11 +414,11 @@ gem install oauth2
413
414
<details>
414
415
<summary>For Medium or High Security Installations</summary>
415
416
416
-
This gem is cryptographically signed, and has verifiable [SHA-256 and SHA-512][💎SHA_checksums] checksums by
417
+
This gem is cryptographically signed and has verifiable [SHA-256 and SHA-512][💎SHA_checksums] checksums by
417
418
[stone_checksums][💎stone_checksums]. Be sure the gem you install hasn’t been tampered with
418
419
by following the instructions below.
419
420
420
-
Add my public key (if you haven’t already, expires 2045-04-29) as a trusted certificate:
421
+
Add my public key (if you haven’t already; will expire 2045-04-29) as a trusted certificate:
@@ -492,7 +493,7 @@ see [gemfiles/README.md](gemfiles/README.md), then submit a PR to the correct ma
492
493
If something doesn't work on one of these interpreters, it's a bug.
493
494
494
495
This library may inadvertently work (or seem to work) on other Ruby
495
-
implementations, however support will only be provided for the versions listed
496
+
implementations; however, support will only be provided for the versions listed
496
497
above.
497
498
498
499
If you would like this library to support another Ruby version, you may
@@ -531,13 +532,13 @@ Some OAuth 2.0 standards legitimately have multiple tokens.
531
532
You may need to subclass `OAuth2::AccessToken`, or write your own custom alternative to it, and pass it in.
532
533
Specify your custom class with the `access_token_class` option.
533
534
534
-
If you only need one token you can, as of v2.0.10,
535
+
If you only need one token, you can, as of v2.0.10,
535
536
specify the exact token name you want to extract via the `OAuth2::AccessToken` using
536
537
the `token_name` option.
537
538
538
539
You'll likely need to do some source diving.
539
540
This gem has 100% test coverage for lines and branches, so the specs are a great place to look for ideas.
540
-
If you have time and energy please contribute to the documentation!
541
+
If you have time and energy, please contribute to the documentation!
541
542
542
543
## 🔧 Basic Usage
543
544
@@ -558,7 +559,7 @@ response.class.name
558
559
559
560
### Relative `authorize_url` and `token_url` (Not on site root, Just Works!)
560
561
561
-
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.
562
+
In the 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.
@@ -751,16 +752,18 @@ a hash of the values), or `from_kvform` (if you have an
751
752
`application/x-www-form-urlencoded` encoded string of the values).
752
753
753
754
Options (since v2.0.x unless noted):
754
-
- expires_latency (Integer | nil): Seconds to subtract from expires_in when computing #expired? to offset latency.
755
-
- token_name (String | Symbol | nil): When multiple token-like fields exist in responses, select the field name to use as the access token (since v2.0.10).
756
-
- mode (Symbol | Proc | Hash): Controls how the token is transmitted on requests made via this AccessToken instance.
757
-
-:header — Send as Authorization: Bearer <token> header (default and preferred by OAuth 2.1 draft guidance).
758
-
-:query — Send as access_token query parameter (discouraged in general, but required by some providers).
755
+
-`expires_latency` (Integer | nil): Seconds to subtract from expires_in when computing #expired? to offset latency.
756
+
-`token_name` (String | Symbol | nil): When multiple token-like fields exist in responses, select the field name to use as the access token (since v2.0.10).
757
+
-`mode` (Symbol | Proc | Hash): Controls how the token is transmitted on requests made via this AccessToken instance.
758
+
-`:header` — Send as Authorization: Bearer <token> header (default and preferred by OAuth 2.1 draft guidance).
759
+
-`:query` — Send as access_token query parameter (discouraged in general, but required by some providers).
759
760
- Verb-dependent (since v2.0.15): Provide either:
760
-
- a Proc taking |verb| and returning :header or :query, or
761
-
- a Hash with verb symbols as keys, for example: {get: :query, post: :header, delete: :header}.
761
+
- a `Proc` taking `|verb|` and returning `:header` or `:query`, or
762
+
- a `Hash` with verb symbols as keys, for example`{get: :query, post: :header, delete: :header}`.
762
763
763
-
Note: Verb-dependent mode was added in v2.0.15 to support providers like Instagram that require query mode for GET and header mode for POST/DELETE.
764
+
Note: Verb-dependent mode supports providers like Instagram that require query mode for `GET` and header mode for `POST`/`DELETE`
765
+
- Verb-dependent mode via `Proc` was added in v2.0.15
766
+
- Verb-dependent mode via `Hash` was added in v2.0.16
0 commit comments