1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-07-11 01:52:48 +00:00

Can generate a reset token if password is valid

This commit is contained in:
2020-07-13 14:20:28 +02:00
parent d33e1fe77c
commit e4b361ab12
5 changed files with 63 additions and 1 deletions

@ -45,4 +45,5 @@ pub mod user_membership_api;
mod type_container_api;
pub mod res_check_email_exists;
pub mod res_check_security_questions_exists;
pub mod res_get_security_questions;
pub mod res_get_security_questions;
pub mod res_check_security_answers;

@ -0,0 +1,17 @@
//! # Check security answsers result
//!
//! If the user gave valid security answers, we give him a password reset token.
//!
//! @author Pierre Hubert
use serde::Serialize;
#[derive(Serialize)]
pub struct ResCheckSecurityAnswers {
reset_token: String
}
impl ResCheckSecurityAnswers {
pub fn new(reset_token: String) -> ResCheckSecurityAnswers {
ResCheckSecurityAnswers { reset_token }
}
}