digest

package
v0.22.6 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package digest 摘要认证,与简单认证相比,其不在网络中明文传送账号和密码

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config *Config) zeroapi.Handler

New 摘要认证

Types

type Config

type Config struct {
	// Password 获取密码信息
	Password Handler

	// Users 记录用户账号密码
	Users map[string]string

	// Expires 有效时间
	Expires time.Duration

	// Realm basic realm
	Realm string

	// Digest ..
	Digest string
	// contains filtered or unexported fields
}

Config 配置

type Handler

type Handler func(account string) (string, error)

Handler 获取账号对应的密码

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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