Skip to main content

workos/models/
authentication_factor.rs

1// This file is auto-generated by oagen. Do not edit.
2
3#[allow(unused_imports)]
4use super::*;
5#[allow(unused_imports)]
6use crate::enums::*;
7use serde::{Deserialize, Serialize};
8#[derive(Debug, Clone, Serialize, Deserialize)]
9pub struct AuthenticationFactor {
10    /// Distinguishes the authentication factor object.
11    pub object: String,
12    /// The unique ID of the factor.
13    pub id: String,
14    /// The type of the factor to enroll.
15    #[serde(rename = "type")]
16    pub type_: AuthenticationFactorType,
17    /// The ID of the [user](https://workos.com/docs/reference/authkit/user).
18    #[serde(skip_serializing_if = "Option::is_none", default)]
19    pub user_id: Option<String>,
20    /// SMS-based authentication factor details.
21    #[serde(skip_serializing_if = "Option::is_none", default)]
22    pub sms: Option<AuthenticationFactorSms>,
23    /// TOTP-based authentication factor details.
24    #[serde(skip_serializing_if = "Option::is_none", default)]
25    pub totp: Option<AuthenticationFactorTotp>,
26    /// An ISO 8601 timestamp.
27    pub created_at: String,
28    /// An ISO 8601 timestamp.
29    pub updated_at: String,
30}