Documentation ¶
Index ¶
- func InitModels()
- type Manager
- func (pwm *Manager) GetSecret(username string) (err error, secret userSecret)
- func (pwm *Manager) HasTOTP(username string) (hastoken bool, err error)
- func (pwm *Manager) Remove(username string) error
- func (pwm *Manager) Save(username, secret string) error
- func (pwm *Manager) Validate(username, securityCode string) (bool, error)
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager stores and validates passwords
type Token ¶
Token represents a totp token with a base32 encoded secret
func TokenFromSecret ¶
TokenFromSecret creates a totp token from an existing base32 encoded secret
Click to show internal directories.
Click to hide internal directories.