Skip to content

Commit

Permalink
Add instructions to get a JWT from the service.
Browse files Browse the repository at this point in the history
  • Loading branch information
wparad committed Jan 21, 2024
1 parent 980d527 commit 983d68b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,21 @@ curl localhost:8888/v1/users/USER/resources/RESOURCE/permissions/PERMISSION

Where `USER` would be the user, `RESOURCE` is the resource uri,and the `PERMISSION` is the permission. Authress recommends using one of the many [SDKs](https://authress.io/knowledge-base/docs/SDKs) to connect instead. If you are interested in already working starter kits for various languages check out the [Authress starter kits](https://authress.io/knowledge-base/docs/SDKs), they are listed by language.

### Generating a JWT for use with your service
The Authress Local container supports dynamically generating valid JWT tokens. Tokens can be also generated by the [Authress Management Portal](https://authress.io/app/#/authress-local?focus=token-generation) if you have internet access. Otherwise, tokens can be generated by the container once it is running.

```bash
curl -XPOST -d'{ }' http://localhost:8888/api/authentication
```

Will return a valid access token in a JSON object:
```bash
200
{
"accessToken":
"eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSIsImtpZCI6ImF1dGhyZXNzLWxvY2FsIn0.eyJhdWQiOiJsb2NhbGhvc3QiLCJleHAiOjE3MDU4NjIzNjksImlhdCI6MTcwNTc3NTk2OSwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo4ODg4Iiwic3ViIjoibWUifQ.F_PiFTg7ir0bDhet_AVs6aeIxbBycXUso-J7sUA22iWK6p4pOUFoyMJTr6ZD_GCEQqI314WMmjllK9GZ9spTBQ"
}
```

## Contributing to Authress Local
Want to contribute to Authress local, check out the [Contribution and Development Guide](./contributing.md)

0 comments on commit 983d68b

Please sign in to comment.