Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( USAGE_SIGNUP = "signup" USAGE_FORGET = "forgetpwd" )
View Source
var SMTPWireSet = wire.NewSet( GetConfig, NewSMTPServer, )
Functions ¶
Types ¶
type Config ¶
type Config struct {
Secret string `env:"ILLA_SECRET_KEY" envDefault:"ausNV5NJfVCrz3tPXtW2ZGGCpUuWFVQbikZ6d7FyOfpw9RcyLiNpqx4pJ6fSX9JXhMfmIupKKjQElURR"`
}
type SMTPServer ¶
type SMTPServer struct {
Secret string
}
func NewSMTPServer ¶
func NewSMTPServer(cfg *Config) SMTPServer
func (*SMTPServer) NewVerificationCode ¶
func (s *SMTPServer) NewVerificationCode(email, usage string) (string, error)
func (*SMTPServer) SendSubscriptionEmail ¶
func (s *SMTPServer) SendSubscriptionEmail(email string) error
func (*SMTPServer) ValidateVerificationCode ¶
func (s *SMTPServer) ValidateVerificationCode(codeToken, vCode, email, usage string) (bool, error)
type VCodeClaims ¶
Click to show internal directories.
Click to hide internal directories.