From 983d68baa1d7618d20c4af0704dcf4d7c7ac87f7 Mon Sep 17 00:00:00 2001 From: Warren Parad Date: Sun, 21 Jan 2024 10:37:32 +0100 Subject: [PATCH] Add instructions to get a JWT from the service. --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 8db7ec2..0f202e4 100644 --- a/README.md +++ b/README.md @@ -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)