twofa

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomSecret

func RandomSecret() string

func Verify2faCode

func Verify2faCode(secret, code string) bool

Types

type Authenticator

type Authenticator struct {
	Secret string
	Expire int
	Code   string
	Error  error
}

func Generate

func Generate(secret string, now time.Time) Authenticator

Generate generate authenticator code

Jump to

Keyboard shortcuts

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