Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Signature ¶
type Signature interface { // Generate 生成签名 Generate(path string, method string, params url.Values) (authorization, date string, err error) // Verify 验证签名 Verify(authorization, date string, path string, method string, params url.Values) (ok bool, err error) // contains filtered or unexported methods }
type SignatureConfig ¶ added in v0.0.49
type SignatureConfig struct { TokenKey string `yaml:"tokenKey"` // X-Signature, 签名验证 Authorization,Header 中传递的参数 TokenDateKey string `yaml:"tokenDateKey"` // X-Signature-Date, 签名验证 Date,Header 中传递的参数 Timeout string `yaml:"timeout"` // time.Minute * 2, 签名有效期为 2 分钟 RedisKeyPrefix string `yaml:"redisKeyPrefix"` // default is "signature" }
Click to show internal directories.
Click to hide internal directories.