Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decryption ¶
Decryption 解密该jwt token,并且映射到实现了 Claims 接口的实例
func Encryption ¶
Encryption 将实现了 Claims 的结构体生成对应的 jwt token
Types ¶
type Claims ¶
type Claims interface { //ExpiresAt 经过多长时间过期 ExpiresAt() time.Duration //Secret 秘钥 Secret() string //继承 jwt.Claims 接口, 该接口在继承 StandardClaims 时自动实现 jwt.Claims }
Claims 定义生成jwt token的方法
type StandardClaims ¶
type StandardClaims = jwt.StandardClaims
Click to show internal directories.
Click to hide internal directories.