bitwarden_auth/login/models/login_request.rs
1use serde::{Deserialize, Serialize};
2
3use super::LoginDeviceRequest;
4
5/// The common bucket of login fields to be re-used across all login mechanisms
6/// (e.g., password, SSO, etc.). This will include handling client_id and 2FA.
7#[derive(Serialize, Deserialize, Debug)]
8#[serde(rename_all = "camelCase", deny_unknown_fields)]
9#[cfg_attr(feature = "uniffi", derive(uniffi::Record))] // add mobile support
10#[cfg_attr(
11 feature = "wasm",
12 derive(tsify::Tsify),
13 tsify(into_wasm_abi, from_wasm_abi)
14)] // add wasm support
15pub struct LoginRequest {
16 /// OAuth client identifier
17 pub client_id: String,
18
19 /// Device information for this login request
20 pub device: LoginDeviceRequest,
21 // TODO: add two factor support
22 // Two-factor authentication
23 // pub two_factor: Option<TwoFactorRequest>,
24}