Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OTP ¶
type OTP interface { // Authenticate verifies the OTP userCode. Authenticate(userCode string) bool // GetUserCode returns the current OTP userCode. GetUserCode() (string, time.Duration) // MaxDuration return the maximum duration a userCode might be valid MaxDuration() time.Duration GetEncodedSecret() string SetEncodedSecret(secret string) error // GetURL returns otpauth url GetURL() *url.URL }
type TOTP ¶
type TOTP struct { Time func() time.Time Tries []int64 TimeStep time.Duration Digits uint8 Hash func() hash.Hash Label string Issuer string // contains filtered or unexported fields }
TOTP contains the different configurable values for a given TOTP invocation.
func (*TOTP) Authenticate ¶
func (*TOTP) GetEncodedSecret ¶
func (*TOTP) MaxDuration ¶
func (*TOTP) SetEncodedSecret ¶
Click to show internal directories.
Click to hide internal directories.