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
[![Donate to my FLOSS or refugee efforts at ko-fi.com][🖇kofi-img]][🖇kofi]
40
-
[![Donate to my FLOSS or refugee efforts using Patreon][🖇patreon-img]][🖇patreon]
16
+
[![Liberapay Goal Progress][⛳liberapay-img]][⛳liberapay][![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor][![Buy me a coffee][🖇buyme-small-img]][🖇buyme][![Donate on Polar][🖇polar-img]][🖇polar][![Donate to my FLOSS or refugee efforts at ko-fi.com][🖇kofi-img]][🖇kofi][![Donate to my FLOSS or refugee efforts using Patreon][🖇patreon-img]][🖇patreon]
41
17
42
18
OAuth 2.0 is the industry-standard protocol for authorization.
43
19
OAuth 2.0 focuses on client developer simplicity while providing specific authorization flows for web applications,
@@ -410,7 +386,7 @@ of a major release, support for that Ruby version may be dropped.
410
386
NOTE: The 1.4 series will only receive critical security updates.
411
387
See [SECURITY.md][🔐security].
412
388
413
-
## Usage Examples
389
+
## 🔧 Basic Usage
414
390
415
391
### Global Configuration
416
392
@@ -533,7 +509,7 @@ client = OAuth2::Client.new(
533
509
```
534
510
</details>
535
511
536
-
## OAuth2::Response
512
+
###OAuth2::Response
537
513
538
514
The `AccessToken` methods `#get`, `#post`, `#put` and `#delete` and the generic `#request`
539
515
will return an instance of the #OAuth2::Response class.
@@ -546,14 +522,14 @@ array. Otherwise, it will return the original body string.
546
522
The original response body, headers, and status can be accessed via their
547
523
respective methods.
548
524
549
-
## OAuth2::AccessToken
525
+
###OAuth2::AccessToken
550
526
551
527
If you have an existing Access Token for a user, you can initialize an instance
552
528
using various class methods including the standard new, `from_hash` (if you have
553
529
a hash of the values), or `from_kvform` (if you have an
554
530
`application/x-www-form-urlencoded` encoded string of the values).
555
531
556
-
## OAuth2::Error
532
+
###OAuth2::Error
557
533
558
534
On 400+ status code responses, an `OAuth2::Error` will be raised. If it is a
559
535
standard OAuth2 error response, the body will be parsed and `#code` and `#description` will contain the values provided from the error and
@@ -565,7 +541,7 @@ option on initialization of the client. In this case the `OAuth2::Response`
565
541
instance will be returned as usual and on 400+ status code responses, the
566
542
Response instance will contain the `OAuth2::Error` instance.
567
543
568
-
## Authorization Grants
544
+
###Authorization Grants
569
545
570
546
Currently the Authorization Code, Implicit, Resource Owner Password Credentials, Client Credentials, and Assertion
571
547
authentication grant types have helper strategy classes that simplify client
@@ -784,7 +760,7 @@ or one of the others at the head of this README.
0 commit comments