diff --git a/VeraxShield/VeraxShield/composants/authentification/FormulaireConnexion.razor.cs b/VeraxShield/VeraxShield/composants/authentification/FormulaireConnexion.razor.cs
index 9f16970..cc8805b 100644
--- a/VeraxShield/VeraxShield/composants/authentification/FormulaireConnexion.razor.cs
+++ b/VeraxShield/VeraxShield/composants/authentification/FormulaireConnexion.razor.cs
@@ -23,6 +23,7 @@ namespace VeraxShield.composants.authentification
protected override async Task OnInitializedAsync()
{
this.Requete = new RequeteConnexion();
+ await base.OnInitializedAsync();
}
public async Task OnSubmit()
@@ -40,5 +41,10 @@ namespace VeraxShield.composants.authentification
}
}
}
+
+ public async Task RedirectionInscription()
+ {
+ this.NavigationManager.NavigateTo("/inscription");
+ }
}
}
\ No newline at end of file
diff --git a/VeraxShield/VeraxShield/composants/authentification/FormulaireInscription.razor b/VeraxShield/VeraxShield/composants/authentification/FormulaireInscription.razor
new file mode 100644
index 0000000..744d900
--- /dev/null
+++ b/VeraxShield/VeraxShield/composants/authentification/FormulaireInscription.razor
@@ -0,0 +1,119 @@
+@using Blazorise.Components;
+@using System.ComponentModel.DataAnnotations;
+
+
+
+
+
+
+
+
S'inscrire
+
+
+
+
+
+
+
+ Pseudo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Prenom
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Nom
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Mail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Mot de passe
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Confirmer le mot de passe
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/VeraxShield/VeraxShield/composants/authentification/FormulaireInscription.razor.cs b/VeraxShield/VeraxShield/composants/authentification/FormulaireInscription.razor.cs
new file mode 100644
index 0000000..61bfe4d
--- /dev/null
+++ b/VeraxShield/VeraxShield/composants/authentification/FormulaireInscription.razor.cs
@@ -0,0 +1,43 @@
+using Blazorise;
+using Microsoft.AspNetCore.Components;
+using VeraxShield.composants.formulaires.modeles;
+
+namespace VeraxShield.composants.authentification
+{
+ public partial class FormulaireInscription
+ {
+
+ [Parameter]
+ public Validations Validations {get; set;}
+
+ public RequeteInscription Requete {get; set;}
+
+ [Inject]
+ private NavigationManager NavigationManager {get; set;}
+
+ [Inject]
+ private DonneurEtat DonneurEtat {get; set;}
+
+ public String Erreur {get; set; }
+
+ protected override async Task OnInitializedAsync()
+ {
+ this.Requete = new RequeteInscription();
+ await base.OnInitializedAsync();
+ }
+
+ public async Task OnSubmit()
+ {
+ if (await this.Validations.ValidateAll())
+ {
+ await DonneurEtat.Inscription(this.Requete);
+ NavigationManager.NavigateTo("/connexion");
+ }
+ }
+
+ public async Task OnAnnulation()
+ {
+ this.NavigationManager.NavigateTo("/connexion");
+ }
+ }
+}
\ No newline at end of file
diff --git a/VeraxShield/VeraxShield/composants/authentification/modele/RequeteConnexion.cs b/VeraxShield/VeraxShield/composants/authentification/modele/RequeteConnexion.cs
index ee522ca..47a7c8a 100644
--- a/VeraxShield/VeraxShield/composants/authentification/modele/RequeteConnexion.cs
+++ b/VeraxShield/VeraxShield/composants/authentification/modele/RequeteConnexion.cs
@@ -8,6 +8,6 @@ namespace VeraxShield.composants.formulaires.modeles
public string MotDePasse { get; set; }
[Required(ErrorMessage="le champ est obligatoire !")]
- public string Nom { get; set; }
+ public string Pseudo { get; set; }
}
}
diff --git a/VeraxShield/VeraxShield/composants/authentification/modele/RequeteInscription.cs b/VeraxShield/VeraxShield/composants/authentification/modele/RequeteInscription.cs
index 0a80f0d..9d99d90 100644
--- a/VeraxShield/VeraxShield/composants/authentification/modele/RequeteInscription.cs
+++ b/VeraxShield/VeraxShield/composants/authentification/modele/RequeteInscription.cs
@@ -13,5 +13,14 @@ namespace VeraxShield.composants.formulaires.modeles
[Required]
public string Nom { get; set; }
+
+ [Required]
+ public string Prenom {get; set;}
+
+ [Required]
+ public string Pseudo { get; set; }
+
+ [Required]
+ public string Mail { get; set;}
}
}
diff --git a/VeraxShield/VeraxShield/factories/UtilisateursFactory.cs b/VeraxShield/VeraxShield/factories/UtilisateursFactory.cs
index dc5b781..34c2cc2 100644
--- a/VeraxShield/VeraxShield/factories/UtilisateursFactory.cs
+++ b/VeraxShield/VeraxShield/factories/UtilisateursFactory.cs
@@ -32,5 +32,16 @@ namespace VeraxShield.factories
return temp;
}
+
+ // public static Utilisateur toUtilisateur(UtilisateurCourant appUtilisateur)
+ // {
+ // return new Utilisateur(appUtilisateur.Pseudo, appUtilisateur.Nom, appUtilisateur.Prenom,
+ // appUtilisateur.Roles[0], appUtilisateur.MotDePasse, appUtilisateur.Mail, false);
+ // }
+
+ public static AppUtilisateur toAppUtilisateur(Utilisateur u)
+ {
+ return new AppUtilisateur(u.Pseudo, u.Nom, u.Prenom, u.Mail, u.Mdp, u.Role);
+ }
}
}
diff --git a/VeraxShield/VeraxShield/modele/authentification/AppUtilisateur.cs b/VeraxShield/VeraxShield/modele/authentification/AppUtilisateur.cs
index 4da82d2..662f348 100644
--- a/VeraxShield/VeraxShield/modele/authentification/AppUtilisateur.cs
+++ b/VeraxShield/VeraxShield/modele/authentification/AppUtilisateur.cs
@@ -2,11 +2,18 @@ public class AppUtilisateur
{
public string MotDePasse { get; set; }
public List Roles { get; set; }
+ public string Pseudo { get; set; }
+ public string Prenom { get; set; }
public string Nom { get; set; }
+ public string Mail { get; set; }
- public AppUtilisateur(string nom, string mdp, String premierRole)
+
+ public AppUtilisateur(string pseudo,string nom, string prenom, string mail, string mdp, String premierRole)
{
this.MotDePasse = mdp;
+ this.Pseudo = pseudo;
+ this.Mail = mail;
+ this.Prenom = prenom;
this.Nom = nom;
this.Roles = new List();
diff --git a/VeraxShield/VeraxShield/modele/authentification/UtilisateurCourant.cs b/VeraxShield/VeraxShield/modele/authentification/UtilisateurCourant.cs
index 9cb4e08..5a1dd43 100644
--- a/VeraxShield/VeraxShield/modele/authentification/UtilisateurCourant.cs
+++ b/VeraxShield/VeraxShield/modele/authentification/UtilisateurCourant.cs
@@ -2,5 +2,5 @@ public class UtilisateurCourant
{
public Dictionary Claims { get; set; }
public bool EstAuthentifie { get; set; }
- public string Nom { get; set; }
+ public string Pseudo { get; set; }
}
\ No newline at end of file
diff --git a/VeraxShield/VeraxShield/pages/Index.razor b/VeraxShield/VeraxShield/pages/Index.razor
index 8cd2665..eeefd6b 100644
--- a/VeraxShield/VeraxShield/pages/Index.razor
+++ b/VeraxShield/VeraxShield/pages/Index.razor
@@ -1,5 +1,7 @@
-@page "/"
+@using VeraxShield.composants.affichages.navBar;
+@page "/"
+ Liste des utilisateurs
+ -> Liste des utilisateurs
+
+-->
+
+
+
+
+
+
+
+
+
+
VeraxShield
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
VeraxShield
+
+
+
+ @layout NavBarPrincipale
+
+
+
+
Adiu : @context.User.Identity.Name!
+
Podètz veire aquest contengut solament se sètz autentificat !
+
+
+
+
+
+
\ No newline at end of file
diff --git a/VeraxShield/VeraxShield/pages/Index.razor.cs b/VeraxShield/VeraxShield/pages/Index.razor.cs
index dcc252a..b6fe570 100644
--- a/VeraxShield/VeraxShield/pages/Index.razor.cs
+++ b/VeraxShield/VeraxShield/pages/Index.razor.cs
@@ -20,9 +20,9 @@ namespace VeraxShield.pages
NavigationManager.NavigateTo("/connexion");
}
- private async Task NavBar()
+ private void RetourVerax()
{
- NavigationManager.NavigateTo("/NavBar");
+ NavigationManager.NavigateTo("https://www.verax.com");
}
}
}
\ No newline at end of file
diff --git a/VeraxShield/VeraxShield/pages/authentification/Inscription.razor b/VeraxShield/VeraxShield/pages/authentification/Inscription.razor
new file mode 100644
index 0000000..f975387
--- /dev/null
+++ b/VeraxShield/VeraxShield/pages/authentification/Inscription.razor
@@ -0,0 +1,14 @@
+@using VeraxShield.composants.authentification;
+
+@page "/inscription"
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/VeraxShield/VeraxShield/pages/erreurs/ErreurParDefaut.razor b/VeraxShield/VeraxShield/pages/erreurs/ErreurParDefaut.razor
new file mode 100644
index 0000000..35207d7
--- /dev/null
+++ b/VeraxShield/VeraxShield/pages/erreurs/ErreurParDefaut.razor
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+ 500
+
+
+ Error intern dau servidor.
+
+
+ Aquesta pagina existís pas
+
+
+
\ No newline at end of file
diff --git a/VeraxShield/VeraxShield/pages/utilisateurs/ListeUtilisateurs.razor b/VeraxShield/VeraxShield/pages/utilisateurs/ListeUtilisateurs.razor
index 060d0f7..5806529 100644
--- a/VeraxShield/VeraxShield/pages/utilisateurs/ListeUtilisateurs.razor
+++ b/VeraxShield/VeraxShield/pages/utilisateurs/ListeUtilisateurs.razor
@@ -4,9 +4,22 @@
@page "/utilisateurs/liste"
@attribute [Authorize(Roles = "admin, modo")]
-
Utilisateurs de Verax
+
+
+
+
+
+
+
Utilisateurs de Verax
+
Vous retrouverez ici les utilisateurs de Verax ainsi que les actions associées