Hi, thanks for Gerrit :)
I just upgraded to the gerritcodereview/gerrit:3.13.3-ubuntu24 docker image to develop integration tests for some tools that use the REST API. I want to use the short lived access tokens instead of the http password.
I noticed that I get an error on using a bare number: "1" or an uuid, which should be accepted according to the error message.
$ curl -u admin:secret \
-X POST \
-d '{
"lifetime": "1d",
}' \
http://localhost:8080/a/accounts/admin/tokens/416f8c6f-2d5c-43f4bead-ad347347ce79Token ID must contain only letters, numbers, hyphens and underscores.
$ curl -u admin:secret \
-X POST \
-d '{
"lifetime": "1d",
"token": "1",
}' \
http://localhost:8080/a/accounts/admin/tokens/1Token ID must contain only letters, numbers, hyphens and underscores.
$ curl -u admin:secret \
-X POST \
-d '{
"lifetime": "1d",
}' \
http://localhost:8080/a/accounts/admin/tokens/main
)]}'
{"id":"main","token":"..."}
The `)]}'` seems spurious but I did not look into why that is printed,
possibly a shell issue, but I did see it both times I generated a token.
Best regards,
Nils