Versions in this module Expand all Collapse all v0 v0.1.0 Feb 3, 2018 Changes in this version + type CompletedHandler interface + SecondFactorCompleted func(userid, action string) + type Controller struct + func NewController(issuerName string, totpStore Storer, emitter events.Emitter) *Controller + func (totpModule *Controller) BindAPI(router *web.Router) + func (totpModule *Controller) CreateToken(userid string) (*otp.Key, error) + func (totpModule *Controller) IsSupported(userid string) bool + func (totpModule *Controller) ListTokens(userid string) ([]TokenResp, error) + func (totpModule *Controller) RemoveToken(userid, tokenID string) (bool, error) + func (totpModule *Controller) ValidateRegistration(userid, tokenName, secret, token string) (bool, error) + func (totpModule *Controller) ValidateToken(userid string, token string) (bool, error) + type RegisterChallenge struct + AccountName string + Image string + Issuer string + Secret string + TokenName string + URL string + type Storer interface + AddTotpToken func(userid, name, secret string, counter uint) (interface{}, error) + GetTotpTokens func(userid string) ([]interface{}, error) + GetUserByExtID func(userid string) (interface{}, error) + RemoveTotpToken func(token interface{}) error + UpdateTotpToken func(token interface{}) (interface{}, error) + type TokenInterface interface + GetCounter func() uint + GetExtID func() string + GetLastUsed func() time.Time + GetName func() string + GetSecret func() string + SetCounter func(uint) + SetLastUsed func(time.Time) + type TokenResp struct + ExtID string + LastUsed time.Time + Name string + UsageCount uint + type User interface + GetEmail func() string