Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AsymmetricMethods = map[string]bool{ "RS256": true, "RS384": true, "RS512": true, "ES256": true, "ES384": true, "ES512": true, }
AsymmetricMethods 非对称加密支持的算法范围
View Source
var CenterSupportedMethods = map[string]bool{ "RS256": true, "HS256": true, }
AsymmetricMethods 非对称加密支持的算法范围
SymmetricMethods 对称加密支持的算法范围
Functions ¶
Types ¶
type Signer ¶
type Signer interface { // Sign 签名一个无过期的token Sign(payload map[string]interface{}, aud string, iss string) (string, error) // ExpSign 签名一个会过期的token ExpSign(payload map[string]interface{}, aud string, iss string, exp int64) (string, error) // SignJSON 为json签名一个无过期的token SignJSON(jsonpayload []byte, aud string, iss string) (string, error) // ExpSignJSON 为json签名一个会过期的token ExpSignJSON(jsonpayload []byte, aud string, iss string, exp int64) (string, error) // SignJSONString 为json字符串签名一个无过期的token SignJSONString(jsonstringpayload string, aud string, iss string) (string, error) // ExpSignJSONString 为json字符串签名一个会过期的token ExpSignJSONString(jsonstringpayload string, aud string, iss string, exp int64) (string, error) }
Signer 签名器接口
Click to show internal directories.
Click to hide internal directories.