twofa

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateQR

func GenerateQR() []byte

GenerateQR generate QR code in bytes.

func InitOTPWithConfig

func InitOTPWithConfig(v *viper.Viper) (*otp.OTP, error)

InitOTPWithConfig init new otp with given viper instance to retrieve the credential and the otp type whether it's hotp or totp.

func Verify

func Verify(code string) bool

Verify do verify given code either using TOTP ot HOTP based on the config.

Types

This section is empty.

Jump to

Keyboard shortcuts

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