auth

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MulanPSL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SignatureResult

type SignatureResult struct {
	AppCode   string // 应用编号
	Signature string // 签名内容
}

SignatureResult 数字签名结果

type Signer

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

type Validator

type Validator interface {
	Validate(ctx context.Context, response *http.Response) error
}

Validator 应答报文验证器

type Verifier

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

Verifier 数字签名认证器

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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