signature

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeDevMsgSignature

func MakeDevMsgSignature(paramValues ...string) string

func VerifyHTTPRequestSignature

func VerifyHTTPRequestSignature(token string, url *url.URL) bool

VerifyHTTPRequestSignature 校验一个 HTTP 请求的签名是否完好

这是 VerifySignature 的简单包装。

func VerifySignature

func VerifySignature(token string, x ToSignature) bool

VerifySignature 校验签名是否完好

Types

type ToSignature

type ToSignature interface {
	// GetSignature 取请求上携带的签名串
	GetSignature() (string, bool)
	// GetParamValues 取所需请求参数值(不必有序)
	GetParamValues() ([]string, bool)
}

ToSignature 适配企业微信请求参数签名的 interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL