diff options
| author | Ellie Huxtable <ellie@elliehuxtable.com> | 2024-06-24 14:54:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-24 14:54:54 +0100 |
| commit | 67d64ec4b368c48188c746f2dba2967ec4615fe5 (patch) | |
| tree | 9da8443d4baa424e99a806cb022d53daa6a8c30e /crates/atuin-common/src/api.rs | |
| parent | fix: Some --help comments didn't show properly (#2176) (diff) | |
| download | atuin-67d64ec4b368c48188c746f2dba2967ec4615fe5.zip | |
feat: add user account verification (#2190)
* add verified column to users table
* add database functions to check if verified, or to verify
* getting there
* verification check
* use base64 urlsafe no pad
* add verification client
* clippy
* correct docs
* fix integration tests
Diffstat (limited to 'crates/atuin-common/src/api.rs')
| -rw-r--r-- | crates/atuin-common/src/api.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/crates/atuin-common/src/api.rs b/crates/atuin-common/src/api.rs index 99b57cec..4e897811 100644 --- a/crates/atuin-common/src/api.rs +++ b/crates/atuin-common/src/api.rs @@ -34,6 +34,22 @@ pub struct RegisterResponse { pub struct DeleteUserResponse {} #[derive(Debug, Serialize, Deserialize)] +pub struct SendVerificationResponse { + pub email_sent: bool, + pub verified: bool, +} + +#[derive(Debug, Serialize, Deserialize)] +pub struct VerificationTokenRequest { + pub token: String, +} + +#[derive(Debug, Serialize, Deserialize)] +pub struct VerificationTokenResponse { + pub verified: bool, +} + +#[derive(Debug, Serialize, Deserialize)] pub struct ChangePasswordRequest { pub current_password: String, pub new_password: String, |
