Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SignKey string = "gwt_sign_key" ExpiresTime int = 259200 )
一些常量
Functions ¶
This section is empty.
Types ¶
type CustomClaims ¶
type CustomClaims struct { Data json.RawMessage jwtD.StandardClaims }
Structured version of Claims Section, as referenced at https://tools.ietf.org/html/rfc7519#section-4.1 See examples for how to use this with your own claim types
type JWT ¶
JWT 签名结构
func (JWT) CreateToken ¶
func (j JWT) CreateToken(claims CustomClaims) (string, error)
CreateToken 生成一个token
Click to show internal directories.
Click to hide internal directories.