Documentation ¶
Index ¶
- Variables
- type EmailService
- type IYOEmailAddressValidationService
- func (service *IYOEmailAddressValidationService) ConfirmValidation(request *http.Request, key, secret string) (err error)
- func (service *IYOEmailAddressValidationService) ExpireValidation(request *http.Request, key string) (err error)
- func (service *IYOEmailAddressValidationService) IsConfirmed(request *http.Request, key string) (confirmed bool, err error)
- func (service *IYOEmailAddressValidationService) RequestPasswordReset(request *http.Request, username string, emails []string) (key string, err error)
- func (service *IYOEmailAddressValidationService) RequestValidation(request *http.Request, username string, email string, confirmationurl string) (key string, err error)
- type IYOPhonenumberValidationService
- func (service *IYOPhonenumberValidationService) ConfirmValidation(request *http.Request, key, code string) (err error)
- func (service *IYOPhonenumberValidationService) ExpireValidation(request *http.Request, key string) (err error)
- func (service *IYOPhonenumberValidationService) IsConfirmed(request *http.Request, key string) (confirmed bool, err error)
- func (service *IYOPhonenumberValidationService) RequestValidation(request *http.Request, username string, phonenumber user.Phonenumber, ...) (key string, err error)
- type SMSService
Constants ¶
This section is empty.
Variables ¶
var ( //ErrInvalidCode denotes that the supplied code is invalid ErrInvalidCode = errors.New("Invalid code") //ErrInvalidOrExpiredKey denotes that the key is not found, it can be invalid or expired ErrInvalidOrExpiredKey = errors.New("Invalid key") )
Functions ¶
This section is empty.
Types ¶
type EmailService ¶
type EmailService interface {
Send(receipients []string, subject string, message string) (err error)
}
EmailService is the interface for an email communication channel, should be used by the IYOEmailAddressValidationService
type IYOEmailAddressValidationService ¶
type IYOEmailAddressValidationService struct {
EmailService EmailService
}
IYOEmailAddressValidationService is the itsyou.online implementation of a EmailAddressValidationService
func (*IYOEmailAddressValidationService) ConfirmValidation ¶
func (service *IYOEmailAddressValidationService) ConfirmValidation(request *http.Request, key, secret string) (err error)
ConfirmValidation checks if the supplied code matches the username and key
func (*IYOEmailAddressValidationService) ExpireValidation ¶
func (service *IYOEmailAddressValidationService) ExpireValidation(request *http.Request, key string) (err error)
ExpireValidation removes a pending validation
func (*IYOEmailAddressValidationService) IsConfirmed ¶
func (service *IYOEmailAddressValidationService) IsConfirmed(request *http.Request, key string) (confirmed bool, err error)
IsConfirmed checks wether a validation request is already confirmed
func (*IYOEmailAddressValidationService) RequestPasswordReset ¶
func (service *IYOEmailAddressValidationService) RequestPasswordReset(request *http.Request, username string, emails []string) (key string, err error)
RequestPasswordReset Request a password reset
func (*IYOEmailAddressValidationService) RequestValidation ¶
func (service *IYOEmailAddressValidationService) RequestValidation(request *http.Request, username string, email string, confirmationurl string) (key string, err error)
RequestValidation validates the email address by sending an EMail
type IYOPhonenumberValidationService ¶
type IYOPhonenumberValidationService struct {
SMSService SMSService
}
IYOPhonenumberValidationService is the itsyou.online implementation of a PhonenumberValidationService
func (*IYOPhonenumberValidationService) ConfirmValidation ¶
func (service *IYOPhonenumberValidationService) ConfirmValidation(request *http.Request, key, code string) (err error)
ConfirmValidation checks if the supplied code matches the username and key
func (*IYOPhonenumberValidationService) ExpireValidation ¶
func (service *IYOPhonenumberValidationService) ExpireValidation(request *http.Request, key string) (err error)
ExpireValidation removes a pending validation
func (*IYOPhonenumberValidationService) IsConfirmed ¶
func (service *IYOPhonenumberValidationService) IsConfirmed(request *http.Request, key string) (confirmed bool, err error)
IsConfirmed checks wether a validation request is already confirmed
func (*IYOPhonenumberValidationService) RequestValidation ¶
func (service *IYOPhonenumberValidationService) RequestValidation(request *http.Request, username string, phonenumber user.Phonenumber, confirmationurl string) (key string, err error)
RequestValidation validates the phonenumber by sending an SMS
type SMSService ¶
SMSService is the interface an sms communication channel should have to be used by the IYOPhonenumberValidationService