You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- package auth
-
- import (
- "time"
-
- "github.com/dgrijalva/jwt-go"
- )
-
- // TokenExpireDuration is jwt 过期时间
- const TokenExpireDuration = time.Hour * 4380
-
- const RefreshTokenExpireDuration = time.Hour * 4380
-
- var Secret = []byte("zyos")
-
- // JWTUser 如果想要保存更多信息,都可以添加到这个结构体中
- type JWTUser struct {
- UID int `json:"uid"`
- Username string `json:"username"`
- Phone string `json:"phone"`
- AppName string `json:"app_name"`
- MiniOpenID string `json:"mini_open_id"` // 小程序的open_id
- MiniSK string `json:"mini_session_key"` // 小程序的session_key
- jwt.StandardClaims
- }
|