Documentation ¶
Index ¶
- func ClearUserMfaKeyInDb[T string | primitive.ObjectID](uid T, cb SaveMfaKeyToDbCb[T]) error
- func GenerateMfaKey(account, issuer string) (*otp.Key, error)
- func GenerateRecCode(key *otp.Key) (string, error)
- func GenerateRecCodes(key *otp.Key, count int) []string
- func GetMfaKeyPngBytes(key *otp.Key) ([]byte, error)
- func SaveMfaKeyToDb[T string | primitive.ObjectID](key *otp.Key, uid T, recCodes []string, cb SaveMfaKeyToDbCb[T]) error
- type LoginParam
- type MfaLoginCallbackFunc
- type MfaLoginParam
- type MfaPatchData
- type MfaType
- type SaveMfaKeyToDbCb
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearUserMfaKeyInDb ¶
func ClearUserMfaKeyInDb[T string | primitive.ObjectID](uid T, cb SaveMfaKeyToDbCb[T]) error
func SaveMfaKeyToDb ¶
Types ¶
type LoginParam ¶
type LoginParam struct { MfaLoginParam Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` GrantType string `json:"grant_type,omitempty"` // 'password' | 'mfa' | 'captcha'; // default is password }
type MfaLoginCallbackFunc ¶
type MfaLoginCallbackFunc func(core.Context, *jwt.CustomClaims)
type MfaLoginParam ¶
type MfaPatchData ¶
type SaveMfaKeyToDbCb ¶
type SaveMfaKeyToDbCb[T string | primitive.ObjectID] func(uid T, data *MfaPatchData) error
Click to show internal directories.
Click to hide internal directories.