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
Copy file name to clipboardExpand all lines: README.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -336,13 +336,15 @@ For more see [SECURITY.md][🔐security].
336
336
- Adds new option to `OAuth2::AccessToken#initialize`:
337
337
-`:expires_latency` (`nil`); number of seconds by which AccessToken validity will be reduced to offset latency
338
338
- By default, keys are transformed to snake case.
339
-
- Original keys will still work as previously, in most scenarios, thanks to [snaky_hash](https://gitlab.com/oauth-xx/snaky_hash) gem.
339
+
- Original keys will still work as previously, in most scenarios, thanks to [snaky_hash][snaky_hash] gem.
340
340
- 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.
341
341
- As of version 2.0.4 you can turn key transformation off with the `snaky: false` option.
342
342
- By default, the `:auth_scheme` is now `:basic_auth` (instead of `:request_body`)
343
343
- Third-party strategies and gems may need to be updated if a provider was requiring client id/secret in the request body
344
344
-[... A lot more](https://gitlab.com/oauth-xx/oauth2/-/blob/main/CHANGELOG.md#200-2022-06-21-tag)
Set an environment variable, however you would [normally do that](https://github.com/bkeepers/dotenv).
493
+
Set an environment variable as per usual (e.g. with [dotenv](https://github.com/bkeepers/dotenv)).
492
494
493
495
```ruby
494
496
# will log both request and response, including bodies
@@ -515,7 +517,7 @@ The `AccessToken` methods `#get`, `#post`, `#put` and `#delete` and the generic
515
517
will return an instance of the #OAuth2::Response class.
516
518
517
519
This instance contains a `#parsed` method that will parse the response body and
518
-
return a Hash-like [`OAuth2::SnakyHash`](https://gitlab.com/oauth-xx/oauth2/-/blob/main/lib/oauth2/snaky_hash.rb) if the `Content-Type` is `application/x-www-form-urlencoded` or if
520
+
return a Hash-like [`SnakyHash::StringKeyed`](https://gitlab.com/oauth-xx/snaky_hash/-/blob/main/lib/snaky_hash/string_keyed.rb) if the `Content-Type` is `application/x-www-form-urlencoded` or if
519
521
the body is a JSON object. It will return an Array if the body is a JSON
520
522
array. Otherwise, it will return the original body string.
521
523
@@ -543,7 +545,7 @@ Response instance will contain the `OAuth2::Error` instance.
543
545
544
546
### Authorization Grants
545
547
546
-
Currently the Authorization Code, Implicit, Resource Owner Password Credentials, Client Credentials, and Assertion
548
+
Currently, the Authorization Code, Implicit, Resource Owner Password Credentials, Client Credentials, and Assertion
547
549
authentication grant types have helper strategy classes that simplify client
548
550
use. They are available via the [`#auth_code`](https://gitlab.com/oauth-xx/oauth2/-/blob/main/lib/oauth2/strategy/auth_code.rb),
0 commit comments