From dfbc705feb3c208ed5fa313bec702771bf9497ec Mon Sep 17 00:00:00 2001 From: Rainnny7 Date: Thu, 19 Sep 2024 03:59:15 -0400 Subject: [PATCH] prod test --- .../cc/pulseapp/api/controller/v1/AuthController.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/cc/pulseapp/api/controller/v1/AuthController.java b/src/main/java/cc/pulseapp/api/controller/v1/AuthController.java index 1895b39..96b3f68 100644 --- a/src/main/java/cc/pulseapp/api/controller/v1/AuthController.java +++ b/src/main/java/cc/pulseapp/api/controller/v1/AuthController.java @@ -16,6 +16,8 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; +import java.util.Iterator; + /** * This controller is responsible for handling * {@link User} authentication requests. @@ -58,7 +60,11 @@ public final class AuthController { */ @PostMapping("/login") @ResponseBody @NonNull public ResponseEntity login(@NonNull HttpServletRequest request, UserLoginInput input) throws BadRequestException { - request.getHeaderNames().asIterator().forEachRemaining(System.out::println); + Iterator iterator = request.getHeaderNames().asIterator(); + while (iterator.hasNext()) { + String name = iterator.next(); + System.out.println("header: " + name + " = " + request.getHeader(name)); + } return ResponseEntity.ok(authService.loginUser(request, input)); } } \ No newline at end of file