Ajout Hash user localStorage

serviceApiJean
Tony Fages 1 year ago
parent 025a8e1b0c
commit 7948d0eecd

@ -1,28 +1,22 @@
{
"iisSettings": {
"iisExpress": {
"applicationUrl": "http://localhost:38362",
"sslPort": 44368
}
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:5272",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"dotnetRunMessages": true,
"applicationUrl": "http://localhost:5272"
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:7112;http://localhost:5272",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"dotnetRunMessages": true,
"applicationUrl": "https://localhost:7112;http://localhost:5272"
},
"IIS Express": {
"commandName": "IISExpress",
@ -30,6 +24,24 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"WSL": {
"commandName": "WSL2",
"launchBrowser": true,
"launchUrl": "https://localhost:7112",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_URLS": "https://localhost:7112;http://localhost:5272"
},
"distributionName": ""
}
},
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:38362",
"sslPort": 44368
}
}
}

@ -38,13 +38,26 @@ namespace VeraxShield.services.UtilisateursDataService
if (lUtilisateurs.Count == 0)
{
lUtilisateurs = await this.getUtilisateursFromJson(this.EmplacementJson);
// Cette boucle permet de hach les mdp des user du json
foreach (var user in lUtilisateurs)
{
var motDePasseClair = user.Mdp;
// Hach du mot de passe
user.Mdp = BCrypt.Net.BCrypt.HashPassword(motDePasseClair);
System.Console.WriteLine(user);
await this.saveUtilisateursLocalStorage(lUtilisateurs);
}
System.Console.WriteLine(lUtilisateurs);
await this.saveUtilisateursLocalStorage(lUtilisateurs);
Console.WriteLine("--> Le contenu du local storage a été écrasé !");
}
return lUtilisateurs;
return lUtilisateurs;
}
public async Task resetDataUtilisateurs()

Loading…
Cancel
Save