|
12345678910111213141516171819 |
- package auth
-
- import (
- "time"
-
- "github.com/dgrijalva/jwt-go"
- )
-
- // TokenExpireDuration is jwt 过期时间
- const TokenExpireDuration = time.Hour * 4380
-
- var Secret = []byte("smart_canteen_customer")
-
- // JWTUser 如果想要保存更多信息,都可以添加到这个结构体中
- type JWTUser struct {
- UserId int `json:"user_id"`
- Username string `json:"username"`
- jwt.StandardClaims
- }
|