Documentation
¶
Overview ¶
Command mint draws a personal access token and prints it beside the hash the database stores.
It exists because the first token has to exist before the API can issue one: a script that starts from an empty installation writes this bootstrap credential into access_token and mints its working token through the API with it. The two halves - the credential and its hash - have to come from the same construction the server verifies with, or the session would prove that a token hashed one way matches a token hashed the same way and nothing else.
So this is deliberately thin: it draws the entropy, builds the token through the domain's own constructor and hashes it through the real hasher. It talks to no database - the script that calls it does the insert - which keeps the credential the only thing this program knows about.