Skip to content

Commit 5089a2d

Browse files
committed
doc(restapi.md): document maximum token validity
Add documentation for the maxTokenValidity setting, which controls the maximum validity period for authentication tokens. Signed-off-by: Thomas Moraine <thomas.moraine@vates.tech>
1 parent bca8f02 commit 5089a2d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

docs/docs/automation/restapi.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ curl -X POST -u admin@admin.net:admin https://xo.example.org/rest/v0/users/me/au
5959
If you don't know your user ID, use the `me` alias, as above. Tokens expire (see the `expiration` timestamp): before that happens, renew by calling the same endpoint with your existing token to create a fresh one.
6060
:::
6161

62+
#### Maximum token validity
63+
64+
The maximum validity period for authentication tokens is controlled by the `maxTokenValidity` setting in the XO configuration file (`config.toml`):
65+
66+
```
67+
[authentication]
68+
maxTokenValidity = '0.5 year'
69+
```
70+
6271
## Reading a collection {#collections-request}
6372

6473
Every object type lives in a collection at `/rest/v0/<name>` (e.g. `/rest/v0/vms`, `/rest/v0/hosts`, `/rest/v0/srs`). A plain `GET` returns the objects' URLs, and the following query parameters shape the result:

0 commit comments

Comments
 (0)