From 13ea5c03672db9b960a889a1ac7403c44338f2a9 Mon Sep 17 00:00:00 2001 From: Parpaillax Date: Tue, 23 Apr 2024 15:41:20 +0200 Subject: [PATCH] patch --- .../java/fr/eni/enchere/controllers/ProfileController.java | 2 +- src/main/java/fr/eni/enchere/security/WebSecurityConfig.java | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/fr/eni/enchere/controllers/ProfileController.java b/src/main/java/fr/eni/enchere/controllers/ProfileController.java index 88f2476..41d8cea 100644 --- a/src/main/java/fr/eni/enchere/controllers/ProfileController.java +++ b/src/main/java/fr/eni/enchere/controllers/ProfileController.java @@ -31,7 +31,7 @@ public class ProfileController { // Obtenez les détails de l'utilisateur authentifié String username = authentication.getName(); // Utilisez le service approprié pour récupérer les informations de l'utilisateur à partir du nom d'utilisateur - UserProfil userProfile = userService.userByName("Jojo"); + UserProfil userProfile = userService.utilisateurByName(username); // Ajoutez les informations du profil à l'objet Model pour les afficher dans la page HTML model.addAttribute("user", new UserProfil()); model.addAttribute("userProfile", userProfile); diff --git a/src/main/java/fr/eni/enchere/security/WebSecurityConfig.java b/src/main/java/fr/eni/enchere/security/WebSecurityConfig.java index 0241ab9..1f4e974 100644 --- a/src/main/java/fr/eni/enchere/security/WebSecurityConfig.java +++ b/src/main/java/fr/eni/enchere/security/WebSecurityConfig.java @@ -35,9 +35,4 @@ public class WebSecurityConfig{ } -// @Bean -// public PasswordEncoder passwordEncoder() { -// return PasswordEncoderFactories.createDelegatingPasswordEncoder(); -// } - }