bitwarden_core/auth/login/response/
captcha_response.rs1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3
4#[derive(Serialize, Deserialize, Debug, JsonSchema)]
5#[serde(rename_all = "camelCase", deny_unknown_fields)]
6pub struct CaptchaResponse {
7 pub site_key: String,
9}
10
11impl From<crate::auth::api::response::IdentityCaptchaResponse> for CaptchaResponse {
12 fn from(api: crate::auth::api::response::IdentityCaptchaResponse) -> Self {
13 Self {
14 site_key: api.site_key,
15 }
16 }
17}
18
19impl From<String> for CaptchaResponse {
20 fn from(s: String) -> Self {
21 Self { site_key: s }
22 }
23}