|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
using System.Security.Cryptography;
|
|
|
|
|
using DbContextLib;
|
|
|
|
|
using DevOne.Security.Cryptography.BCrypt;
|
|
|
|
|
using Entities;
|
|
|
|
|
using Microsoft.AspNetCore.Cryptography.KeyDerivation;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
@ -20,12 +21,13 @@ public class StubbedContext : UserDbContext
|
|
|
|
|
{
|
|
|
|
|
Id = 1,
|
|
|
|
|
Username = "johnny",
|
|
|
|
|
Password = Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
|
/*Password = Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
|
password: "Motdepasse",
|
|
|
|
|
salt: RandomNumberGenerator.GetBytes(128 / 8),
|
|
|
|
|
prf: KeyDerivationPrf.HMACSHA256,
|
|
|
|
|
iterationCount: 100000,
|
|
|
|
|
numBytesRequested: 256 / 8)),
|
|
|
|
|
numBytesRequested: 256 / 8)),*/
|
|
|
|
|
Password = BCryptHelper.HashPassword("Motdepasse", BCryptHelper.GenerateSalt()),
|
|
|
|
|
Email = "Johnny.RATTON@etu.uca.fr",
|
|
|
|
|
IsAdmin = true
|
|
|
|
|
},
|
|
|
|
@ -33,12 +35,13 @@ public class StubbedContext : UserDbContext
|
|
|
|
|
{
|
|
|
|
|
Id = 2,
|
|
|
|
|
Username = "maxime",
|
|
|
|
|
Password = Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
|
/*Password = Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
|
password: "Motdepasse",
|
|
|
|
|
salt: RandomNumberGenerator.GetBytes(128 / 8),
|
|
|
|
|
prf: KeyDerivationPrf.HMACSHA256,
|
|
|
|
|
iterationCount: 100000,
|
|
|
|
|
numBytesRequested: 256 / 8)),
|
|
|
|
|
numBytesRequested: 256 / 8)),*/
|
|
|
|
|
Password = BCryptHelper.HashPassword("Motdepasse", BCryptHelper.GenerateSalt()),
|
|
|
|
|
Email = "Maxime.SAPOUNTZIS@etu.uca.fr",
|
|
|
|
|
IsAdmin = true
|
|
|
|
|
},
|
|
|
|
@ -46,12 +49,13 @@ public class StubbedContext : UserDbContext
|
|
|
|
|
{
|
|
|
|
|
Id = 3,
|
|
|
|
|
Username = "clement",
|
|
|
|
|
Password = Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
|
/*Password = Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
|
password: "Motdepasse",
|
|
|
|
|
salt: RandomNumberGenerator.GetBytes(128 / 8),
|
|
|
|
|
prf: KeyDerivationPrf.HMACSHA256,
|
|
|
|
|
iterationCount: 100000,
|
|
|
|
|
numBytesRequested: 256 / 8)),
|
|
|
|
|
numBytesRequested: 256 / 8)),*/
|
|
|
|
|
Password = BCryptHelper.HashPassword("Motdepasse", BCryptHelper.GenerateSalt()),
|
|
|
|
|
Email = "Clement.CHIEU@etu.uca.fr",
|
|
|
|
|
IsAdmin = true
|
|
|
|
|
},
|
|
|
|
@ -59,12 +63,13 @@ public class StubbedContext : UserDbContext
|
|
|
|
|
{
|
|
|
|
|
Id = 4,
|
|
|
|
|
Username = "erwan",
|
|
|
|
|
Password = Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
|
/*Password = Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
|
password: "Motdepasse",
|
|
|
|
|
salt: RandomNumberGenerator.GetBytes(128 / 8),
|
|
|
|
|
prf: KeyDerivationPrf.HMACSHA256,
|
|
|
|
|
iterationCount: 100000,
|
|
|
|
|
numBytesRequested: 256 / 8)),
|
|
|
|
|
numBytesRequested: 256 / 8)),*/
|
|
|
|
|
Password = BCryptHelper.HashPassword("Motdepasse", BCryptHelper.GenerateSalt()),
|
|
|
|
|
Email = "Erwan.MENAGER@etu.uca.fr",
|
|
|
|
|
IsAdmin = true
|
|
|
|
|
},
|
|
|
|
@ -72,12 +77,13 @@ public class StubbedContext : UserDbContext
|
|
|
|
|
{
|
|
|
|
|
Id = 5,
|
|
|
|
|
Username = "victor",
|
|
|
|
|
Password = Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
|
/*Password = Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
|
password: "Motdepasse",
|
|
|
|
|
salt: RandomNumberGenerator.GetBytes(128 / 8),
|
|
|
|
|
prf: KeyDerivationPrf.HMACSHA256,
|
|
|
|
|
iterationCount: 100000,
|
|
|
|
|
numBytesRequested: 256 / 8)),
|
|
|
|
|
numBytesRequested: 256 / 8)),*/
|
|
|
|
|
Password = BCryptHelper.HashPassword("Motdepasse", BCryptHelper.GenerateSalt()),
|
|
|
|
|
Email = "Victor.GABORIT@etu.uca.fr",
|
|
|
|
|
IsAdmin = true
|
|
|
|
|
});
|
|
|
|
|