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
Click to show internal directories.
Click to hide internal directories.