Versions in this module Expand all Collapse all v3 v3.0.0 Jan 13, 2024 Changes in this version + const DataNumRecoveryCodes + const DataRecoveryCode + const DataRecoveryCodes + const DataVerifyEmail + const DataVerifyURL + const EmailVerifyHTML + const EmailVerifyTxt + const FormValueToken + const PageRecovery2FA + const PageVerify2FA + const PageVerifyEnd2FA + func BCryptRecoveryCodes(codes []string) ([]string, error) + func DecodeRecoveryCodes(codes string) []string + func EncodeRecoveryCodes(codes []string) string + func GenerateRecoveryCodes() ([]string, error) + func GenerateToken() (string, error) + func UseRecoveryCode(codes []string, inputCode string) ([]string, bool) + type EmailVerify struct + TwofactorKind string + TwofactorSetupURL string + func SetupEmailVerify(ab *authboss.Authboss, twofactorKind, setupURL string) (EmailVerify, error) + func (e EmailVerify) End(w http.ResponseWriter, r *http.Request) error + func (e EmailVerify) GetStart(w http.ResponseWriter, r *http.Request) error + func (e EmailVerify) PostStart(w http.ResponseWriter, r *http.Request) error + func (e EmailVerify) SendVerifyEmail(ctx context.Context, to, token string) + func (e EmailVerify) Wrap(handler http.Handler) http.Handler + type EmailVerifyTokenValuer interface + GetToken func() string + func MustHaveEmailVerifyTokenValues(v authboss.Validator) EmailVerifyTokenValuer + type Recovery struct + func (rc *Recovery) GetRegen(w http.ResponseWriter, r *http.Request) error + func (rc *Recovery) PostRegen(w http.ResponseWriter, r *http.Request) error + func (rc *Recovery) Setup() error + type User interface + GetEmail func() string + GetRecoveryCodes func() string + PutEmail func(string) + PutRecoveryCodes func(codes string)