Skip to main content

bootstrap

Function bootstrap 

Source
pub async fn bootstrap(
    __arg0: State<AppState>,
    body: Option<Json<TtlRequest>>,
) -> impl IntoResponse
Expand description

POST /api/admin/bootstrap — phase 1 of the claim.

Mints a candidate admin JWT. Bootstrap stays open: the token is minted revoked, so it is not valid for anything until the client confirms it.

An optional {"ttl_hours": n} body lets the first administrator choose the credential lifetime; it is clamped to crate::admin::DEFAULT_CLAIM_TTL_HOURS.