Class VerificationController

java.lang.Object
com.greenloop.auth_service.controller.VerificationController

@RestController @RequestMapping("/api/verify") public class VerificationController extends Object
Endpoints for sending and validating email verification OTP codes.
  • Constructor Details

    • VerificationController

      public VerificationController()
  • Method Details

    • sendOtp

      @PostMapping("/send-otp") public org.springframework.http.ResponseEntity<String> sendOtp(@RequestParam String email)
      Sends a one-time password (OTP) to the given email.
    • checkOtp

      @PostMapping("/check-otp") public org.springframework.http.ResponseEntity<String> checkOtp(@RequestParam String email, @RequestParam String otp)
      Validates the OTP for the provided email.