This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/break/junhong_cmp_fiber/pkg/auth"
|
||||
"github.com/break/junhong_cmp_fiber/pkg/constants"
|
||||
"github.com/break/junhong_cmp_fiber/pkg/errors"
|
||||
pkgmiddleware "github.com/break/junhong_cmp_fiber/pkg/middleware"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/redis/go-redis/v9"
|
||||
"go.uber.org/zap"
|
||||
@@ -97,6 +98,9 @@ func (m *PersonalAuthMiddleware) Authenticate() fiber.Handler {
|
||||
c.Locals("customer_asset_type", claims.AssetType)
|
||||
c.Locals("customer_asset_id", claims.AssetID)
|
||||
c.Locals("skip_owner_filter", true)
|
||||
c.SetUserContext(pkgmiddleware.SetUserContext(c.UserContext(), &pkgmiddleware.UserContextInfo{
|
||||
CustomerID: claims.CustomerID,
|
||||
}))
|
||||
|
||||
m.logger.Debug("个人客户认证成功",
|
||||
zap.Uint("customer_id", claims.CustomerID),
|
||||
|
||||
Reference in New Issue
Block a user