kv-proto: add PreloginResponse for GET /v1/auth/prelogin

A new device needs account_id and the KDF params to derive AUTH_INPUT
before it can build KE1, so they cannot come only from login/start.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-15 21:31:46 +09:00
co-authored by Claude Opus 5.5
parent 48c7e32d33
commit cbef689903
+8
View File
@@ -134,6 +134,14 @@ pub struct SetupRequest {
pub device: DeviceEnroll, pub device: DeviceEnroll,
} }
/// `GET /v1/auth/prelogin`: the public inputs a new device needs to derive `AUTH_INPUT`
/// before it can build `ke1` (docs/02 "Key derivation"). Unauthenticated, rate limited.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct PreloginResponse {
pub account_id: Uuid,
pub kdf: KdfParams,
}
/// `POST /v1/auth/login/start`. /// `POST /v1/auth/login/start`.
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
pub struct LoginStart { pub struct LoginStart {