Documentation ¶ Index ¶ func ClientSecretVerifier(cSecret string, sInfo LoginInfo) (errMsg string, err error) func GetToken(claims *Claims, expireTime int64) (string, error) type Claims func ParserToken(strToken string) (*Claims, error) type LoginInfo func EncryptSecret(info LoginInfo) LoginInfo Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func ClientSecretVerifier ¶ func ClientSecretVerifier( cSecret string, sInfo LoginInfo, ) (errMsg string, err error) 客户端密钥验证 func GetToken ¶ func GetToken(claims *Claims, expireTime int64) (string, error) token字符串获取 Types ¶ type Claims ¶ type Claims struct { jwt.StandardClaims ServerID string `json:"server_id"` } func ParserToken ¶ func ParserToken(strToken string) (*Claims, error) token解析 type LoginInfo ¶ type LoginInfo struct { ServerID string ClientSecret string Timestamp int64 } func EncryptSecret ¶ func EncryptSecret(info LoginInfo) LoginInfo 加密密钥 Source Files ¶ View all Source files jwt.go Click to show internal directories. Click to hide internal directories.