Bind a worker's name and labels into its token; list and revoke tokens by jti
This commit is contained in:
@@ -252,9 +252,12 @@ On the engine, mint a token:
|
||||
|
||||
```sh
|
||||
curl -X POST https://api.${DOMAIN}/api/v1/workers/tokens \
|
||||
-H "Authorization: Bearer $TOKEN" -d '{"name": "shed-pi"}'
|
||||
-H "Authorization: Bearer $TOKEN" -d '{"name": "shed-pi", "labels": ["shed", "gpio"]}'
|
||||
```
|
||||
|
||||
The labels are signed into it, so the worker can repeat them with `--labels`
|
||||
but not change them.
|
||||
|
||||
On the other machine:
|
||||
|
||||
```sh
|
||||
|
||||
Reference in New Issue
Block a user