From 60dc910a27796161036e6fee12fde59ba78a0b1c Mon Sep 17 00:00:00 2001 From: CaIon Date: Thu, 9 Oct 2025 14:17:49 +0800 Subject: [PATCH] fix: update jwt package import to v5 across multiple files --- go.mod | 3 +-- relay/channel/task/kling/adaptor.go | 2 +- relay/channel/vertex/service_account.go | 2 +- relay/channel/zhipu/relay-zhipu.go | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 4e743d231..125cc5c74 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/go-playground/validator/v10 v10.20.0 github.com/go-redis/redis/v8 v8.11.5 github.com/go-webauthn/webauthn v0.14.0 - github.com/golang-jwt/jwt v3.2.2+incompatible + github.com/golang-jwt/jwt/v5 v5.3.0 github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.0 github.com/jinzhu/copier v0.4.0 @@ -68,7 +68,6 @@ require ( github.com/go-sql-driver/mysql v1.7.0 // indirect github.com/go-webauthn/x v0.1.25 // indirect github.com/goccy/go-json v0.10.2 // indirect - github.com/golang-jwt/jwt/v5 v5.3.0 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-tpm v0.9.5 // indirect github.com/gorilla/context v1.1.1 // indirect diff --git a/relay/channel/task/kling/adaptor.go b/relay/channel/task/kling/adaptor.go index fec3396ae..e91562aca 100644 --- a/relay/channel/task/kling/adaptor.go +++ b/relay/channel/task/kling/adaptor.go @@ -13,7 +13,7 @@ import ( "github.com/samber/lo" "github.com/gin-gonic/gin" - "github.com/golang-jwt/jwt" + "github.com/golang-jwt/jwt/v5" "github.com/pkg/errors" "one-api/constant" diff --git a/relay/channel/vertex/service_account.go b/relay/channel/vertex/service_account.go index f90d5454d..14a7ea8ce 100644 --- a/relay/channel/vertex/service_account.go +++ b/relay/channel/vertex/service_account.go @@ -13,7 +13,7 @@ import ( "strings" "github.com/bytedance/gopkg/cache/asynccache" - "github.com/golang-jwt/jwt" + "github.com/golang-jwt/jwt/v5" "fmt" "time" diff --git a/relay/channel/zhipu/relay-zhipu.go b/relay/channel/zhipu/relay-zhipu.go index 8eb0dcc13..86ec1eafb 100644 --- a/relay/channel/zhipu/relay-zhipu.go +++ b/relay/channel/zhipu/relay-zhipu.go @@ -17,7 +17,7 @@ import ( "time" "github.com/gin-gonic/gin" - "github.com/golang-jwt/jwt" + "github.com/golang-jwt/jwt/v5" ) // https://open.bigmodel.cn/doc/api#chatglm_std