Generated @harmont/cloud reference for the Auth endpoints.
cliClaim
POST /api/v0/auth/cli/claim
Claim a transferred session token (CLI loopback poll)
The CLI polls with the nonce it generated; on a match within the 60s window it receives the raw session token (single-use).
import { cliClaim } from "@harmont/cloud";cliClaim(options): RequestResult<CliClaimResponse>Body CliClaimRequest (optional)
Returns CliClaimResponse
See POST /api/v0/auth/cli/claim for the full request and response schema.
cliCode
POST /api/v0/auth/cli/code
Mint a human-typeable CLI paste code
Mints a fresh session token for the current user and a short paste code (valid 5 minutes) the user re-types into the CLI to redeem it.
import { cliCode } from "@harmont/cloud";cliCode(options): RequestResult<CliCodeResponse>Returns CliCodeResponse
See POST /api/v0/auth/cli/code for the full request and response schema.
cliRedeem
POST /api/v0/auth/cli/redeem
Redeem a CLI paste code for a session token
The CLI submits the paste code the user typed in; on a match within the 5m window it receives the raw session token (single-use).
import { cliRedeem } from "@harmont/cloud";cliRedeem(options): RequestResult<CliRedeemResponse>Body CliRedeemRequest (optional)
Returns CliRedeemResponse
See POST /api/v0/auth/cli/redeem for the full request and response schema.
cliTransfer
POST /api/v0/auth/cli/transfer
Hand a session token to a locally-running CLI (loopback)
Mints a fresh session token for the current user and parks it under the CLI-supplied nonce for 60 seconds. The CLI claims it via the claim endpoint.
import { cliTransfer } from "@harmont/cloud";cliTransfer(options): RequestResult<CliTransferResponse>Body CliTransferRequest (optional)
Returns CliTransferResponse
See POST /api/v0/auth/cli/transfer for the full request and response schema.
logout
POST /api/v0/auth/logout
Log out (revoke the current bearer token)
Revokes the bearer token used for this request. The token can no longer be used to authenticate. Idempotent.
import { logout } from "@harmont/cloud";logout(options): RequestResult<LogoutResponse>Returns LogoutResponse
See POST /api/v0/auth/logout for the full request and response schema.