Documentation ¶
Index ¶
Constants ¶
View Source
const ( HS256 = "HS256" HS1 = "HS1" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Payload ¶
type Payload struct { StandardPayload Addition map[string]interface{} }
type StandardPayload ¶
type StandardPayload struct { Iss string `json:"iss"` // 签发者 Iat string `json:"iat"` // 签发时间 Exp string `json:"exp"` // 过期时间 Aud string `json:"aud"` // 接收jwt的一方 Sub string `json:"sub"` // jwt面向的用户 Nbf string `json:"nbf"` // 定义在什么时间之前,该jwt都是不可用的 Jti string `json:"jti"` // jwt的唯一身份标识,主要用来作为一次性token,从而回避重放攻击 }
Payload
Click to show internal directories.
Click to hide internal directories.