auth

package
v0.0.0-...-8deb3a7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OTPManager

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

func (*OTPManager) GenerateOTP

func (om *OTPManager) GenerateOTP() (string, error)

type TokenManager

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

func (*TokenManager) GenerateToken

func (tm *TokenManager) GenerateToken(phone string) (string, error)

func (*TokenManager) ValidateToken

func (tm *TokenManager) ValidateToken(tokenString string) (*jwt.Token, error)

type TwoFAManager

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

func NewTwoFAManager

func NewTwoFAManager(cfg *config.Config) *TwoFAManager

func (*TwoFAManager) GenerateCode

func (tm *TwoFAManager) GenerateCode(secretKey string) (string, error)

func (*TwoFAManager) GenerateQRCode

func (tm *TwoFAManager) GenerateQRCode(phone, secretKey string) (string, error)

func (*TwoFAManager) GenerateSecretKey

func (tm *TwoFAManager) GenerateSecretKey(phone string) (string, error)

func (*TwoFAManager) ValidateCode

func (tm *TwoFAManager) ValidateCode(secretKey, code string) bool

Jump to

Keyboard shortcuts

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