diff --git a/src/main/java/fr/eni/enchere/controllers/LoginController.java b/src/main/java/fr/eni/enchere/controllers/LoginController.java index b81fb7f..dcd0ce7 100644 --- a/src/main/java/fr/eni/enchere/controllers/LoginController.java +++ b/src/main/java/fr/eni/enchere/controllers/LoginController.java @@ -34,9 +34,4 @@ public class LoginController { return "redirect:/security/login?error"; } } - - @GetMapping("/logout") - public String logout(Model modele) { - return "security/logout"; - } } diff --git a/src/main/java/fr/eni/enchere/security/WebSecurityConfig.java b/src/main/java/fr/eni/enchere/security/WebSecurityConfig.java index 6c8b697..344da7a 100644 --- a/src/main/java/fr/eni/enchere/security/WebSecurityConfig.java +++ b/src/main/java/fr/eni/enchere/security/WebSecurityConfig.java @@ -22,10 +22,15 @@ public class WebSecurityConfig{ .requestMatchers("/profil/**", "/article/new/**", "/article/update", "/article/delete").authenticated() .requestMatchers("/admin").hasRole("ADMIN") .anyRequest().authenticated()) - .formLogin((form) -> form.loginPage("/login").defaultSuccessUrl("/", true)) - .logout((logout) -> logout.clearAuthentication(true).invalidateHttpSession(true) - .deleteCookies("JSESSIONID").logoutSuccessUrl("/logout") - .logoutRequestMatcher(new AntPathRequestMatcher("/logout")).permitAll()); + .formLogin((form) -> form + .loginPage("/login") + .defaultSuccessUrl("/", true)) + .logout((logout) -> logout + .logoutUrl("/logout") + .logoutSuccessUrl("/accueil") // Redirection après déconnexion + .invalidateHttpSession(true) + .clearAuthentication(true) + .deleteCookies("JSESSIONID")); return http.build(); } diff --git a/src/main/resources/i18n/messages_fr.properties b/src/main/resources/i18n/messages_fr.properties index d57e581..9f3a9ce 100644 --- a/src/main/resources/i18n/messages_fr.properties +++ b/src/main/resources/i18n/messages_fr.properties @@ -1,3 +1,44 @@ accueil.search.title = Rechercher un article par nom... accueil.search.cat = Toutes les cat\u00e9gories -accueil.search.button = Recherche \ No newline at end of file +accueil.search.button = Recherche + +profil.title = Mon profil +profil.button = Modifier +profil.pseudo = Pseudo: +profil.surname = Pr\u00e9nom: +profil.name = Nom: +profil.email = Email: +profil.phone = T\u00e9l\u00e9phone: +profil.street = Rue: +profil.postal = Code postal: +profil.city = Ville: +profil.credit = Cr\u00e9dits: + +edit.profil.currentpassword = Mot de passe actuel: +edit.profil.newpassword = Nouveau mot de passe: +edit.profil.confirmnewpassword = Confirmation du nouveau mot de passe: +edit.profil.title = Modifier mon profil +edit.profil.button.edit = Enregistrer les modifications +edit.profil.button.del = Supprimer mon compte + +login.title = Pour se Connecter : +login.id = Identifiant: +login.password = Mot de passe: +login.save = Se souvenir de moi +login.forgotpassword = Mot de passe oubli\u00e9 +login.connection = Connexion +login.makecompte = Cr\u00e9er un compte + +register.title = Mon profil +register.button = Modifier +register.pseudo = Pseudo: +register.surname = Pr\u00e9nom: +register.name = Nom: +register.email = Email: +register.phone = T\u00e9l\u00e9phone: +register.street = Rue: +register.postal = Code postal: +register.city = Ville: +register.credit = Cr\u00e9dits: +register.make = cr\u00e9er +register.cancel = annuler \ No newline at end of file diff --git a/src/main/resources/templates/editProfil.html b/src/main/resources/templates/editProfil.html index d04a20b..e5f0d89 100644 --- a/src/main/resources/templates/editProfil.html +++ b/src/main/resources/templates/editProfil.html @@ -1,158 +1,123 @@ - + -
-

Mon profil

-
- - -
- -
- +
+

+ +
+
+ +
+ + +
+
    +
  • +
+
+
+ +
+ + +
+
    +
  • +
+
+
+ +
+ + +
+
    +
  • +
+
+
+ +
+ + +
+
    +
  • +
+
+
+ +
+ + +
+
    +
  • +
+
+
+ +
+ + +
+
    +
  • +
+
+
+ +
+ + +
+
    +
  • +
+
+
+ +
+ + +
+
    +
  • +
+
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+ +
+ +
- -
    -
  • -
-
- -
- -
- -
- -
    -
  • -
-
-
- -
- -
- -
- -
    -
  • -
-
-
- -
- -
- -
- -
    -
  • -
-
-
- -
- -
- -
- -
    -
  • -
-
-
- -
- -
- -
- -
    -
  • -
-
-
- -
- -
- -
- -
    -
  • -
-
-
- -
- -
- -
- -
    -
  • -
-
-
- -
- -
- -
- -
    -
  • -
-
-
- -
- -
- -
- -
    -
  • -
-
-
- -
- -
- -
- -
    -
  • -
-
-
-
Crédits:
- - - -
- + +
- + diff --git a/src/main/resources/templates/modele-page.html b/src/main/resources/templates/modele-page.html index 5d4572f..08daed0 100644 --- a/src/main/resources/templates/modele-page.html +++ b/src/main/resources/templates/modele-page.html @@ -28,7 +28,7 @@ Mon profile