dengbiao před 5 dny
rodič
revize
d4d23fa736
3 změnil soubory, kde provedl 9 přidání a 8 odebrání
  1. +1
    -1
      app/lib/auth/base.go
  2. +2
    -2
      app/md/app_redis_key.go
  3. +6
    -5
      go.mod

+ 1
- 1
app/lib/auth/base.go Zobrazit soubor

@@ -9,7 +9,7 @@ import (
// TokenExpireDuration is jwt 过期时间
const TokenExpireDuration = time.Hour * 24

var Secret = []byte("smart_canteen_admin")
var Secret = []byte("egg_admin")

// JWTUser 如果想要保存更多信息,都可以添加到这个结构体中
type JWTUser struct {


+ 2
- 2
app/md/app_redis_key.go Zobrazit soubor

@@ -4,9 +4,9 @@ package md
const (
JwtTokenKey = "%s:egg_admin_jwt_token:%s" // jwt, 占位符:ip, admin:id

JwtTokenCacheTime = 3600 * 4
JwtTokenCacheTime = 3600 * 6

AppCfgCacheKey = "cfg_cache:%s" // 占位符: key的第一个字母
AppCfgCacheKey = "egg_admin_cfg_cache:%s" // 占位符: key的第一个字母

CfgCacheTime = 86400



+ 6
- 5
go.mod Zobrazit soubor

@@ -13,7 +13,7 @@ require (
github.com/dchest/uniuri v0.0.0-20200228104902-7aecb25e1fe5
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/forgoer/openssl v0.0.0-20201023062029-c3112b0c8700
github.com/gin-gonic/gin v1.9.0
github.com/gin-gonic/gin v1.9.1
github.com/go-playground/locales v0.14.1
github.com/go-playground/universal-translator v0.18.1
github.com/go-playground/validator/v10 v10.20.0
@@ -35,11 +35,12 @@ require (
)

require (
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241112032738-ca9b07ba7b24
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241118141706-576f2789ac24
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.3
code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.0
code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5
github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible
github.com/gin-contrib/sessions v1.0.1
github.com/go-sql-driver/mysql v1.8.1
github.com/gocolly/colly v1.2.0
github.com/olivere/elastic/v7 v7.0.32
@@ -73,9 +74,9 @@ require (
github.com/golang/snappy v0.0.4 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/gookit/color v1.3.8 // indirect
github.com/gorilla/context v1.1.1 // indirect
github.com/gorilla/securecookie v1.1.1 // indirect
github.com/gorilla/sessions v1.2.1 // indirect
github.com/gorilla/context v1.1.2 // indirect
github.com/gorilla/securecookie v1.1.2 // indirect
github.com/gorilla/sessions v1.2.2 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kennygrant/sanitize v1.2.4 // indirect


Načítá se…
Zrušit
Uložit