auth

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package auth 微信支付 API v3 Go SDK 安全验证相关接口

Package auth 微信支付 API v3 Go SDK 安全验证相关接口

Package auth 微信支付 API v3 Go SDK 安全验证相关接口

Package auth 微信支付 API v3 Go SDK 安全验证相关接口

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credential

type Credential interface {
	GenerateAuthorizationHeader(ctx context.Context, method, canonicalURL, signBody string) (string, error)
}

Credential 请求报文头 Authorization 信息生成器

type SignatureResult

type SignatureResult struct {
	MchID               string // 商户号
	CertificateSerialNo string // 签名对应的证书序列号
	Signature           string // 签名内容
}

SignatureResult 数字签名结果

type Signer

type Signer interface {
	Sign(ctx context.Context, message string) (*SignatureResult, error) // 对信息进行签名
	Algorithm() string                                                  // 返回使用的签名算法
}

Signer 数字签名生成器

type Validator

type Validator interface {
	Validate(ctx context.Context, response *http.Response) error // 对 HTTP 应答报文进行验证
}

Validator 应答报文验证器

type Verifier

type Verifier interface {
	Verify(ctx context.Context, serial, message, signature string) error // 对签名信息进行验证
}

Verifier 数字签名验证器

Directories

Path Synopsis
Package credentials 微信支付 API v3 Go SDK 请求报文头 Authorization 信息生成器
Package credentials 微信支付 API v3 Go SDK 请求报文头 Authorization 信息生成器
Package signers 微信支付 API v3 Go SDK 数字签名生成器
Package signers 微信支付 API v3 Go SDK 数字签名生成器
Package validators 微信支付 API v3 Go SDK 应答报文签名验证器
Package validators 微信支付 API v3 Go SDK 应答报文签名验证器
Package verifiers 微信支付 API v3 Go SDK 数字签名验证器
Package verifiers 微信支付 API v3 Go SDK 数字签名验证器

Jump to

Keyboard shortcuts

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