From 3175c62e6dacdb1c02de9162f9708fd96c583359 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Thu, 7 Mar 2024 11:33:06 +0100 Subject: [PATCH] Carmack level testing instructions --- backend/internal/handlers/global_state.go | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/internal/handlers/global_state.go b/backend/internal/handlers/global_state.go index 5dc8895..ffe2072 100644 --- a/backend/internal/handlers/global_state.go +++ b/backend/internal/handlers/global_state.go @@ -115,6 +115,7 @@ func (gs *GState) Login(c *fiber.Ctx) error { // LoginRenew is a simple handler that renews the token func (gs *GState) LoginRenew(c *fiber.Ctx) error { + // For testing: curl localhost:3000/restricted -H "Authorization: Bearer " user := c.Locals("user").(*jwt.Token) claims := user.Claims.(jwt.MapClaims) claims["exp"] = time.Now().Add(time.Hour * 72).Unix()