Spring Boot, Java, Programming, Technology, 2fa.
@PostMapping("/verify-totp") public ResponseEntity<?> verifyTotp(@RequestBody TotpVerificationRequest request) { boolean isValid = totpVerificationService.verifyTotp(request.getSecret(), request.getTotp()); if (isValid) { return ResponseEntity.ok("Authentication successful."); } else { return