From 4cb95db012697dbefbd5e434c1b2c96a48aa8d43 Mon Sep 17 00:00:00 2001 From: Lev Khoroshansky Date: Wed, 20 Dec 2023 16:13:41 +0100 Subject: [PATCH 1/5] feat: Add `phone_code` and `email_code` verification strategies --- src/models/email_address_verification.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/models/email_address_verification.rs b/src/models/email_address_verification.rs index bbb3a46..089f6e4 100644 --- a/src/models/email_address_verification.rs +++ b/src/models/email_address_verification.rs @@ -48,6 +48,12 @@ impl Default for Status { pub enum Strategy { #[serde(rename = "admin")] Admin, + #[serde(rename = "from_oauth_google")] + FromOAuthGoogle, + #[serde(rename = "phone_code")] + PhoneCode, + #[serde(rename = "email_code")] + EmailCode, #[serde(other)] Other, } From 04609c2b11a1064ca6a1fddc35413d40728faf45 Mon Sep 17 00:00:00 2001 From: Lev Khoroshansky Date: Wed, 20 Dec 2023 23:49:30 +0100 Subject: [PATCH 2/5] feat: Add Twitter OAuth strategy --- src/models/email_address_verification.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/models/email_address_verification.rs b/src/models/email_address_verification.rs index 089f6e4..2428c5a 100644 --- a/src/models/email_address_verification.rs +++ b/src/models/email_address_verification.rs @@ -48,12 +48,14 @@ impl Default for Status { pub enum Strategy { #[serde(rename = "admin")] Admin, - #[serde(rename = "from_oauth_google")] - FromOAuthGoogle, #[serde(rename = "phone_code")] PhoneCode, #[serde(rename = "email_code")] EmailCode, + #[serde(rename = "from_oauth_google")] + FromOAuthGoogle, + #[serde(rename = "from_oauth_twitter")] + FromOAuthTwitter, #[serde(other)] Other, } From adc3bd10ceb4baac5ffb9f330bcc5d12212ac009 Mon Sep 17 00:00:00 2001 From: Lev Khoroshansky Date: Wed, 20 Dec 2023 23:53:48 +0100 Subject: [PATCH 3/5] feat: Add Twitter identification link type --- src/models/identification_link.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/models/identification_link.rs b/src/models/identification_link.rs index 8f1f0b6..2df63ec 100644 --- a/src/models/identification_link.rs +++ b/src/models/identification_link.rs @@ -27,6 +27,8 @@ impl IdentificationLink { pub enum Type { #[serde(rename = "oauth_google")] OauthGoogle, + #[serde(rename = "oauth_twitter")] + OauthTwitter, #[serde(rename = "oauth_mock")] OauthMock, #[serde(rename = "saml")] From 9e0a81529e6d55c1bb75433e19309873ddb05bbf Mon Sep 17 00:00:00 2001 From: Lev Khoroshansky Date: Thu, 21 Dec 2023 00:18:16 +0100 Subject: [PATCH 4/5] fix: Add `expired` verification status --- src/models/email_address_verification.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/models/email_address_verification.rs b/src/models/email_address_verification.rs index 2428c5a..b8b1b74 100644 --- a/src/models/email_address_verification.rs +++ b/src/models/email_address_verification.rs @@ -36,6 +36,8 @@ impl EmailAddressVerification { pub enum Status { #[serde(rename = "verified")] Verified, + #[serde(rename = "expired")] + Expired, } impl Default for Status { From 203746870be1eb42ca0be2622e87e4e8c69856c7 Mon Sep 17 00:00:00 2001 From: Lev Khoroshansky Date: Sat, 31 Aug 2024 15:42:13 +0200 Subject: [PATCH 5/5] fix: Also add `Failed` --- src/models/email_address_verification.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/models/email_address_verification.rs b/src/models/email_address_verification.rs index b8b1b74..eaa5a94 100644 --- a/src/models/email_address_verification.rs +++ b/src/models/email_address_verification.rs @@ -38,6 +38,8 @@ pub enum Status { Verified, #[serde(rename = "expired")] Expired, + #[serde(rename = "failed")] + Failed, } impl Default for Status {