Class UserSettingsService
java.lang.Object
io.github.navjotsrakhra.eventmanager.service.UserSettingsService
The UserSettingsService class provides methods for managing user settings, including password changes.
-
Constructor Summary
ConstructorsConstructorDescriptionUserSettingsService(UserRepository repository, org.springframework.security.crypto.password.PasswordEncoder encoder) Constructor for the UserSettingsService class. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<?> changePassword(Principal principal, String newPassword) Change the password for the currently logged-in user.
-
Constructor Details
-
Method Details
-
changePassword
public org.springframework.http.ResponseEntity<?> changePassword(Principal principal, String newPassword) Change the password for the currently logged-in user.- Parameters:
principal- The Principal object representing the currently logged-in user.newPassword- The new password to be set for the user.- Returns:
- ResponseEntity indicating the result of the password change operation.
-