mirror of
				https://gitlab.com/comunic/comunicapiv3
				synced 2025-11-03 17:14:03 +00:00 
			
		
		
		
	Can generate a reset token if password is valid
This commit is contained in:
		@@ -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;
 | 
			
		||||
							
								
								
									
										17
									
								
								src/api_data/res_check_security_answers.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								src/api_data/res_check_security_answers.rs
									
									
									
									
									
										Normal file
									
								
							@@ -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 }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user