Documentation
¶
Index ¶
- func GenerateOTPSeed(digits int, algorithm string, skew uint, period uint, user core.IUser) (secret string, imagePath string)
- func GetOTP(seed string, digits int, algorithm string, skew uint, period uint) string
- func VerifyOTP(pass, seed string, digits int, algorithm string, skew uint, period uint) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateOTPSeed ¶
func GetOTP ¶
getOTP is a function that generates TOTP using github.com/pquerna/otp
Parameters:
- seed: OTP seed is base32
- digits: the number of digits for the OTP
- algorithm: "sha1", "sha256", "sha512"
- skew: the number of minutes to search around the OTP
- period: the number of seconds for the OTP to change
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.