A pending CLI sign-in, for the console's confirmation
What `hart login` asked for: the console's `/cli-login?code=<user code>` page shows it before the user approves. 404 when the code is unknown, expired, or already approved or denied.
openapi/harthelm.yaml at v1.5.0__Host-harthelm_session<token>Browser session of the UI (12 h idle, 7 days absolute). State-changing requests also need the header
Harthelm-CSRF: 1 and a matching Origin.
code*stringThe user code hart login printed, e.g. BDFH-KMNP (case and the dash do not matter).
8 <= length <= 9The pending sign-in.
application/json- response
user_code*stringmode*CliLoginMode"loopback""code"name*stringThe name the new API key will get.
hostname*stringos?stringcli_version?stringremote_addr?stringThe address the sign-in was started from, as core saw it.
created_at*stringdate-timeexpires_at*stringdate-timecurl -X GET 'https://console.example.com/api/v1/me/cli-logins/stringst'{ "user_code": "string", "mode": "loopback", "name": "string", "hostname": "string", "os": "string", "cli_version": "string", "remote_addr": "string", "created_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z"}Deny a CLI sign-in
Browser sessions only. The CLI's next redeem answers `cli-login-closed`.
Redeem an approved CLI sign-in
Works without credentials; the `code_verifier` is the proof. `202` while nobody approved yet (poll again after `interval` seconds); `200` once, with a new API key of the approving user (source `cli`, name from the start request); afterwards, and after a denial or the expiry, `409 cli-login-closed`. A wrong verifier is `404`, like an unknown sign-in.