Class ForgotPasswordController

java.lang.Object
callofproject.dev.authentication.controller.ForgotPasswordController

@RequestMapping("api/auth/forgot-password") @RestController public class ForgotPasswordController extends Object
Authentication Controller Copyleft (C), 2023, Cal-of-Project-Teams Developers. All Rights free.
  • Constructor Details

    • ForgotPasswordController

      public ForgotPasswordController(ForgotPasswordService forgotPasswordService)
      Constructor for the AuthenticationController class. It is used to inject dependencies into the controller.
      Parameters:
      forgotPasswordService - The AuthenticationService object to be injected.
  • Method Details

    • SendPasswordResetEmail

      @PostMapping("/password-reset-request") public org.springframework.http.ResponseEntity<Object> SendPasswordResetEmail(@RequestParam("email") String email)
      Send password reset email with generated token.
      Parameters:
      email - represent the email
      Returns:
      the boolean value.
    • changePassword

      @PostMapping("/password-reset") public org.springframework.http.ResponseEntity<Object> changePassword(@RequestBody ForgotPasswordDTO forgotPasswordDTO)
      Change user password after confirm
      Parameters:
      forgotPasswordDTO - represent the information of new password and token
      Returns:
      boolean value.