From 28ad46d40383d14b80c00b4705b9a9302a744969 Mon Sep 17 00:00:00 2001 From: yanweidong Date: Fri, 28 Jun 2024 11:29:46 +0800 Subject: [PATCH] fix jwt --- encipher/aes.go | 1 + types/encipher.go | 1 + 2 files changed, 2 insertions(+) diff --git a/encipher/aes.go b/encipher/aes.go index 9a2db64..82eb181 100644 --- a/encipher/aes.go +++ b/encipher/aes.go @@ -34,6 +34,7 @@ func GenerateTokenAes(id uint, identity, client, role string, owner any, extend claims := types.JwtClaims{ ID: id, Identity: identity, + Client: client, Extend: extend, Owner: owner, Role: role, diff --git a/types/encipher.go b/types/encipher.go index ce98949..620199b 100644 --- a/types/encipher.go +++ b/types/encipher.go @@ -9,6 +9,7 @@ type JwtClaims struct { ID uint `json:"id"` Identity string `json:"identity"` Extend map[string]string `json:"extend"` + Client string `json:"client"` Owner any `json:"owner"` Role string `json:"role"` ExpiresAt int64 `json:"exp"`