totp

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddParams

type AddParams struct {
	Name      string
	Secret    []byte
	Algorithm Algorithm
}

type Algorithm

type Algorithm string
const (
	AlgorithmSHA1   Algorithm = "SHA1"
	AlgorithmSHA256 Algorithm = "SHA256"
	AlgorithmSHA512 Algorithm = "SHA512"
	AlgorithmMD5    Algorithm = "MD5"
)

type PasscodeGenerator

type PasscodeGenerator func() (string, error)

type PasscodeView

type PasscodeView struct {
	GeneratePasscode func() (string, error)
	LastCountdown    int64
	Period           int64
}

type Service

type Service interface {
	AddIssuer(ctx context.Context, params AddParams) error
	PasscodeView(ctx context.Context, name string) (PasscodeView, error)
}

func NewService

func NewService(s store.Service) Service

Jump to

Keyboard shortcuts

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