Skip to content

Commit

Permalink
Merge pull request authlib#74 from azmeuk/readme
Browse files Browse the repository at this point in the history
curl resource access example
  • Loading branch information
lepture authored Aug 8, 2020
2 parents 2f65234 + baf728f commit c9038c1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,13 @@ have enabled `password` grant types, let's try:
$ curl -u ${client_id}:${client_secret} -XPOST http://127.0.0.1:5000/oauth/token -F grant_type=password -F username=${username} -F password=valid -F scope=profile
```

Because this is an example, every user's password is `valid`. For now, you
can read the source in example or follow the long boring tutorial below.
Because this is an example, every user's password is `valid`. Now you can access `/api/me`:

```bash
$ curl -H "Authorization: Bearer ${access_token}" http://127.0.0.1:5000/api/me
```

For now, you can read the source in example or follow the long boring tutorial below.

**IMPORTANT**: To test implicit grant, you need to `token_endpoint_auth_method` to `none`.

Expand Down

0 comments on commit c9038c1

Please sign in to comment.