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": { "profiles": {
"http": { "http": {
"commandName": "Project", "commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true, "launchBrowser": true,
"applicationUrl": "http://localhost:5272",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} },
"dotnetRunMessages": true,
"applicationUrl": "http://localhost:5272"
}, },
"https": { "https": {
"commandName": "Project", "commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true, "launchBrowser": true,
"applicationUrl": "https://localhost:7112;http://localhost:5272",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} },
"dotnetRunMessages": true,
"applicationUrl": "https://localhost:7112;http://localhost:5272"
}, },
"IIS Express": { "IIS Express": {
"commandName": "IISExpress", "commandName": "IISExpress",
@ -30,6 +24,24 @@
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "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,12 +38,25 @@ namespace VeraxShield.services.UtilisateursDataService
if (lUtilisateurs.Count == 0) if (lUtilisateurs.Count == 0)
{ {
lUtilisateurs = await this.getUtilisateursFromJson(this.EmplacementJson); 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);
}
System.Console.WriteLine(lUtilisateurs);
await this.saveUtilisateursLocalStorage(lUtilisateurs); await this.saveUtilisateursLocalStorage(lUtilisateurs);
Console.WriteLine("--> Le contenu du local storage a été écrasé !"); Console.WriteLine("--> Le contenu du local storage a été écrasé !");
} }
return lUtilisateurs; return lUtilisateurs;
} }

Loading…
Cancel
Save