authenticator

package
v0.0.0-...-98563ba Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCode

func GenerateCode(domain, userName string, size int) ([]byte, string, error)

GenerateCode 生成2FA 二维码图片和 qrcode text

func GenerateCodeAndSecret

func GenerateCodeAndSecret(domain, userName string, size int) ([]byte, string, error)

GenerateCodeAndSecret 生成2FA 二维码图片和 secret

func GenerateKey

func GenerateKey(domain, userName string) (string, error)

GenerateKey 生成2FA qrcode text

func GenerateSecret

func GenerateSecret(domain, userName string) (string, error)

GenerateSecret 生成2FA secret

func GenerateUrlAndSecret

func GenerateUrlAndSecret(domain, userName string) (string, string, error)

GenerateUrlAndSecret 生成2FA qrcode text 和 secret

func Validate

func Validate(url, code string) (bool, error)

Validate 根据url 验证 code

func ValidateCode

func ValidateCode(secret, code string) bool

ValidateCode 根据secret验证code

Types

This section is empty.

Jump to

Keyboard shortcuts

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