Start to create 2FA exemption after successful 2FA login
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-11-12 10:24:00 +01:00
parent c24318f6b8
commit 7a3eaa944e
7 changed files with 88 additions and 7 deletions

View File

@ -55,6 +55,7 @@ pub struct UpdateUserQuery {
email: String,
gen_new_password: Option<String>,
enabled: Option<String>,
two_factor_exemption_after_successful_login: Option<String>,
admin: Option<String>,
grant_type: String,
granted_clients: String,
@ -84,6 +85,10 @@ pub async fn users_route(
user.last_name = update.0.last_name;
user.email = update.0.email;
user.enabled = update.0.enabled.is_some();
user.two_factor_exemption_after_successful_login = update
.0
.two_factor_exemption_after_successful_login
.is_some();
user.admin = update.0.admin.is_some();
let factors_to_keep = update.0.two_factor.split(';').collect::<Vec<_>>();