From 18a549be07e1ec091a2878ee2cd5d23375b8a5d7 Mon Sep 17 00:00:00 2001 From: Laurent Date: Tue, 9 Dec 2025 19:20:09 +0100 Subject: [PATCH] Revert "Add authentication on payement" This reverts commit 64e64373ce45ff320834134f186a0f7ef4a9bfc3. --- assets/pages/index.html | 6 +-- assets/pages/payment.html | 40 +++++++++++++++++++ .../src/handlers/RequestHandler.java | 1 - 3 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 assets/pages/payment.html diff --git a/assets/pages/index.html b/assets/pages/index.html index 95bc87f..4096204 100644 --- a/assets/pages/index.html +++ b/assets/pages/index.html @@ -100,17 +100,15 @@ btnPay.addEventListener("click", async() => { let token = document.getElementById("token-input").value; + let dataToken = { token: token }; - let creds = JSON.parse(localStorage.getItem("creds")); - await fetch("/payment", { method: "POST", headers: { - "Content-Type": "application/json", - "Authorization": `Basic ${creds.username}:${creds.password}` + "Content-Type": "application/json" }, body: JSON.stringify(dataToken) }) diff --git a/assets/pages/payment.html b/assets/pages/payment.html new file mode 100644 index 0000000..3356b12 --- /dev/null +++ b/assets/pages/payment.html @@ -0,0 +1,40 @@ + + + + + MASI 3DSecure + + + + + +
+ +
+ + + + \ No newline at end of file diff --git a/src/main/java/httpServer/httpServer/src/handlers/RequestHandler.java b/src/main/java/httpServer/httpServer/src/handlers/RequestHandler.java index a7b39e6..c6237ac 100644 --- a/src/main/java/httpServer/httpServer/src/handlers/RequestHandler.java +++ b/src/main/java/httpServer/httpServer/src/handlers/RequestHandler.java @@ -41,7 +41,6 @@ public class RequestHandler implements IRequestHandler { } } - @OnlyAuthorizedClients @AllowedVerb(name = "POST") public void handlePayment(HttpExchange exchange) { Logger.displayReceived("/payment request");