|
|
@ -17,36 +17,71 @@ public class StubbedContext : UserDbContext
|
|
|
|
{
|
|
|
|
{
|
|
|
|
base.OnModelCreating(modelBuilder);
|
|
|
|
base.OnModelCreating(modelBuilder);
|
|
|
|
modelBuilder.Entity<UserEntity>().HasData(
|
|
|
|
modelBuilder.Entity<UserEntity>().HasData(
|
|
|
|
new UserEntity(1, "johnny", Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
new UserEntity
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Id = 1,
|
|
|
|
|
|
|
|
Username = "johnny",
|
|
|
|
|
|
|
|
Password = Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
password: "motdepasse",
|
|
|
|
password: "motdepasse",
|
|
|
|
salt: RandomNumberGenerator.GetBytes(128 / 8),
|
|
|
|
salt: RandomNumberGenerator.GetBytes(128 / 8),
|
|
|
|
prf: KeyDerivationPrf.HMACSHA256,
|
|
|
|
prf: KeyDerivationPrf.HMACSHA256,
|
|
|
|
iterationCount: 100000,
|
|
|
|
iterationCount: 100000,
|
|
|
|
numBytesRequested: 256 / 8)), "Johnny.RATTON@etu.uca.fr", true),
|
|
|
|
numBytesRequested: 256 / 8)),
|
|
|
|
new UserEntity(2, "maxime", Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
Email = "Johnny.RATTON@etu.uca.fr",
|
|
|
|
|
|
|
|
IsAdmin = true
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
new UserEntity
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Id = 2,
|
|
|
|
|
|
|
|
Username = "maxime",
|
|
|
|
|
|
|
|
Password = Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
password: "motdepasse",
|
|
|
|
password: "motdepasse",
|
|
|
|
salt: RandomNumberGenerator.GetBytes(128 / 8),
|
|
|
|
salt: RandomNumberGenerator.GetBytes(128 / 8),
|
|
|
|
prf: KeyDerivationPrf.HMACSHA256,
|
|
|
|
prf: KeyDerivationPrf.HMACSHA256,
|
|
|
|
iterationCount: 100000,
|
|
|
|
iterationCount: 100000,
|
|
|
|
numBytesRequested: 256 / 8)), "Maxime.SAPOUNTZIS@etu.uca.fr", true),
|
|
|
|
numBytesRequested: 256 / 8)),
|
|
|
|
new UserEntity(3, "clement", Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
Email = "Maxime.SAPOUNTZIS@etu.uca.fr",
|
|
|
|
|
|
|
|
IsAdmin = true
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
new UserEntity
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Id = 3,
|
|
|
|
|
|
|
|
Username = "clement",
|
|
|
|
|
|
|
|
Password = Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
password: "motdepasse",
|
|
|
|
password: "motdepasse",
|
|
|
|
salt: RandomNumberGenerator.GetBytes(128 / 8),
|
|
|
|
salt: RandomNumberGenerator.GetBytes(128 / 8),
|
|
|
|
prf: KeyDerivationPrf.HMACSHA256,
|
|
|
|
prf: KeyDerivationPrf.HMACSHA256,
|
|
|
|
iterationCount: 100000,
|
|
|
|
iterationCount: 100000,
|
|
|
|
numBytesRequested: 256 / 8)), "Clement.CHIEU@etu.uca.fr", true),
|
|
|
|
numBytesRequested: 256 / 8)),
|
|
|
|
new UserEntity(4, "erwan", Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
Email = "Clement.CHIEU@etu.uca.fr",
|
|
|
|
|
|
|
|
IsAdmin = true
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
new UserEntity
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Id = 4,
|
|
|
|
|
|
|
|
Username = "erwan",
|
|
|
|
|
|
|
|
Password = Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
password: "motdepasse",
|
|
|
|
password: "motdepasse",
|
|
|
|
salt: RandomNumberGenerator.GetBytes(128 / 8),
|
|
|
|
salt: RandomNumberGenerator.GetBytes(128 / 8),
|
|
|
|
prf: KeyDerivationPrf.HMACSHA256,
|
|
|
|
prf: KeyDerivationPrf.HMACSHA256,
|
|
|
|
iterationCount: 100000,
|
|
|
|
iterationCount: 100000,
|
|
|
|
numBytesRequested: 256 / 8)), "Erwan.MENAGER@etu.uca.fr", true),
|
|
|
|
numBytesRequested: 256 / 8)),
|
|
|
|
new UserEntity(5, "victor", Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
Email = "Erwan.MENAGER@etu.uca.fr",
|
|
|
|
|
|
|
|
IsAdmin = true
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
new UserEntity
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Id = 5,
|
|
|
|
|
|
|
|
Username = "victor",
|
|
|
|
|
|
|
|
Password = Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
password: "motdepasse",
|
|
|
|
password: "motdepasse",
|
|
|
|
salt: RandomNumberGenerator.GetBytes(128 / 8),
|
|
|
|
salt: RandomNumberGenerator.GetBytes(128 / 8),
|
|
|
|
prf: KeyDerivationPrf.HMACSHA256,
|
|
|
|
prf: KeyDerivationPrf.HMACSHA256,
|
|
|
|
iterationCount: 100000,
|
|
|
|
iterationCount: 100000,
|
|
|
|
numBytesRequested: 256 / 8)), "Victor.GABORIT@etu.uca.fr", true));
|
|
|
|
numBytesRequested: 256 / 8)),
|
|
|
|
|
|
|
|
Email = "Victor.GABORIT@etu.uca.fr",
|
|
|
|
|
|
|
|
IsAdmin = true
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity<InquiryTableEntity>().HasData(
|
|
|
|
modelBuilder.Entity<InquiryTableEntity>().HasData(
|
|
|
|
new InquiryTableEntity
|
|
|
|
new InquiryTableEntity
|
|
|
|