Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateToken ¶
GenerateToken 生成 JWT 令牌
func NewNumericDate ¶
func NewNumericDate(t time.Time) *jwt.NumericDate
Types ¶
type AuthClaims ¶
type AuthClaims struct {
Guard string `json:"guard"` // 授权守卫
jwt.RegisteredClaims
}
func ParseToken ¶
func ParseToken(token string, secret string) (*AuthClaims, error)
ParseToken 解析 JWT Token
type Options ¶
type Options jwt.RegisteredClaims
Click to show internal directories.
Click to hide internal directories.