source

package
v0.0.0-...-a1e2317 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator interface {

	// Generate generates a named one-time password using the given reference time
	Generate(clock time.Time, name string) (string, error)

	// Name returns the name of this generator
	Name() string
}

Generator is the interface defined by read-only sources of OTPs

type Source

type Source interface {
	Generator

	// Add adds a new named TOTP secret
	Add(name string, secret []byte) error

	// Delete removes a named TOTP secret
	Delete(name string) error
}

Source is the interface defined by r/w sources of OTPS

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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