redis token

This commit is contained in:
zp
2024-01-15 17:30:07 +08:00
parent 00122cc66d
commit cb8ca55aba
28 changed files with 931 additions and 31 deletions

View File

@ -5,4 +5,19 @@ const (
PhoneVerifyType1 = 1 // 1-注册/登录
PhoneVerifyType2 = 2 // 2-找回密码
ContextKey = "ContextKey" // 上下文变量存储键名,前后端系统共享
// for 登录相关
TokenType = "Bearer"
CacheModeRedis = 2
GtokenWriterPrefix = "Writer:" // gtoken登录小说作者后台前缀区分
BackendServerName = "小说系统"
MultiLogin = true
FrontendMultiLogin = true
GTokenExpireIn = 10 * 24 * 60 * 60
// for writer
CtxWriterId = "CtxAdminId"
CtxWriterName = "CtxAdminName"
CtxWriterIsAdmin = "CtxAdminIsAdmin"
CtxWriterRoleIds = "CtxAdminRoleIds"
)