Carmack level testing instructions

This commit is contained in:
Imbus 2024-03-07 11:33:06 +01:00
parent b31349ec37
commit 3175c62e6d

View file

@ -115,6 +115,7 @@ func (gs *GState) Login(c *fiber.Ctx) error {
// LoginRenew is a simple handler that renews the token // LoginRenew is a simple handler that renews the token
func (gs *GState) LoginRenew(c *fiber.Ctx) error { func (gs *GState) LoginRenew(c *fiber.Ctx) error {
// For testing: curl localhost:3000/restricted -H "Authorization: Bearer <token>"
user := c.Locals("user").(*jwt.Token) user := c.Locals("user").(*jwt.Token)
claims := user.Claims.(jwt.MapClaims) claims := user.Claims.(jwt.MapClaims)
claims["exp"] = time.Now().Add(time.Hour * 72).Unix() claims["exp"] = time.Now().Add(time.Hour * 72).Unix()