Versions in this module Expand all Collapse all v0 v0.0.1 Mar 15, 2021 Changes in this version + const DataConfirmCode + const EmailConfirmHTML + const EmailConfirmTxt + const PageConfirm + var ErrRetryLimit = errors.New("retry limit reached please wait") + func GenerateConfirmCreds(length int) (code string, hash string, err error) + func Middleware(ab *authboss.Authboss) func(http.Handler) http.Handler + type Config struct + AddDashes int + AttemptPeriod time.Duration + CodeExpiry time.Duration + Length int + PathNotOK string + PathOK string + func Defaults() *Config + type Confirm struct + func Setup(ab *authboss.Authboss, cfg *Config) (*Confirm, error) + func (c *Confirm) Get(w http.ResponseWriter, r *http.Request) error + func (c *Confirm) Post(w http.ResponseWriter, r *http.Request) error + func (c *Confirm) PreventAuth(w http.ResponseWriter, r *http.Request, handled bool) (bool, error) + func (c *Confirm) SendConfirmEmail(ctx context.Context, to, code string) + func (c *Confirm) StartConfirmation(ctx context.Context, user User, sendEmail bool) error + func (c *Confirm) StartConfirmationWeb(w http.ResponseWriter, r *http.Request, handled bool) (bool, error) + type Storer interface + LoadByConfirmCode func(ctx context.Context, code string) (User, error) + func EnsureCanConfirm(storer authboss.ServerStorer) Storer + type User interface + GetConfirmCode func() (code string) + GetConfirmExpiration func() (date time.Time) + GetConfirmLastAttempt func() (date time.Time) + GetConfirmed func() (confirmed bool) + GetEmail func() (email string) + PutConfirmCode func(verifier string) + PutConfirmExpiration func(date time.Time) + PutConfirmLastAttempt func(date time.Time) + PutConfirmed func(confirmed bool) + PutEmail func(email string) + func MustHaveConfirmFields(u authboss.User) User