selo auth creates that authorization, verifies it through a file you serve from your own origin, and reports its status. All three subcommands are free.
selo auth without create, verify or status exits 3 with selo auth needs create, verify or status.
For the full walkthrough, including how to serve the file from common hosts, see Authorize your endpoint. For the rules Selo applies, see Authorization.
selo auth create
Requests a verification challenge for one URL and method. Selo answers with a single line that you serve from your origin to prove you control it.Flags
What it does
The CLI sendsPOST /v1/authorizations with targetUrl, method, project and contact. Selo creates a PENDING authorization and a one-time verification line. Selo stores only a hash of the token in that line.
Output
Terminal
selo-verification=… line, exactly as printed, at https://<your origin>/.well-known/selo-verification.txt. The file may hold several lines, so one origin can carry challenges for several routes. Keep it under 4 KiB: Selo reads no more than that.
The challenge is valid for 1 hour after you create it. Verify within that hour, or create a new one.
Exit codes
selo auth verify
Asks Selo to fetch your verification file and, if it carries the line, mark the authorizationVERIFIED.
Flags
What it does
The CLI sendsPOST /v1/authorizations/<id>/verify. Selo fetches https://<origin>/.well-known/selo-verification.txt from a public address only, trims each line, and looks for a selo-verification= line whose token matches the challenge. On a match, the authorization becomes VERIFIED and expires 24 hours later.
Verifying an authorization that is already VERIFIED returns it unchanged, without fetching the file again. It does not extend the expiry: create a new authorization when it lapses.
Output
Terminal
When Selo refuses, the CLI prints the HTTP status, the error code and Selo’s message on stderr:
Terminal
Errors from Selo
See Errors and reason codes for the API side.
Exit codes
selo auth status
Reads an authorization without changing it, except that Selo marks a lapsed authorizationEXPIRED when you read it.
Flags
Output
The CLI sendsGET /v1/authorizations/<id> and prints the same three lines as selo auth verify:
Terminal
Exit codes
Because only
VERIFIED exits 0, you can use selo auth status as a cheap pre-check before a paid run.
Statuses and types
Examples
Related
- Run a preflight: the next step once the authorization is
VERIFIED. - selo preflight returns
AUTHORIZATION_MISSINGorAUTHORIZATION_EXPIREDwhen the authorization does not cover the target. - CLI overview for shared flag rules and exit codes.