Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Claims ¶
type Claims struct { AppID string `json:"appId,omitempty"` Uid string `json:"uid,omitempty"` Type uint `json:"type,omitempty"` //登录方式 Role string `json:"role,omitempty"` jwt.RegisteredClaims }
Claims 结构体,包含 ID 和 Username 字段,以及标准的声明
type Jwt ¶
type Jwt struct {
// contains filtered or unexported fields
}
func (Jwt) GenerateToken ¶
GenerateToken 生成token
Click to show internal directories.
Click to hide internal directories.