ub2fa

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TotpService

type TotpService interface {
	GenerateTotp(accountName string) (string, error)
	ValidateTotp(url string, code string) (bool, error)
	GenerateTotpPng(w io.Writer, url string) error
	GetTotpCode(url string) (string, error)
}

func NewTotpService

func NewTotpService(issuer string) TotpService

type TotpServiceImpl

type TotpServiceImpl struct {
	// contains filtered or unexported fields
}

func (*TotpServiceImpl) GenerateTotp

func (s *TotpServiceImpl) GenerateTotp(accountName string) (string, error)

func (*TotpServiceImpl) GenerateTotpPng

func (s *TotpServiceImpl) GenerateTotpPng(w io.Writer, url string) error

func (*TotpServiceImpl) GetTotpCode

func (s *TotpServiceImpl) GetTotpCode(url string) (string, error)

func (*TotpServiceImpl) ValidateTotp

func (s *TotpServiceImpl) ValidateTotp(url string, code string) (bool, error)

Jump to

Keyboard shortcuts

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