Documentation ¶
Index ¶
- Variables
- type EmailService
- type EmailWithButtonTemplateParams
- type IYOEmailAddressValidationService
- func (service *IYOEmailAddressValidationService) ConfirmRegistrationValidation(r *http.Request, key, secret string) (err error)
- 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, langKey string) (key string, err error)
- func (service *IYOEmailAddressValidationService) RequestValidation(request *http.Request, username string, email string, confirmationurl string, ...) (key string, err error)
- func (service *IYOEmailAddressValidationService) SendOrganizationInviteEmail(request *http.Request, invite *invitations.JoinOrganizationInvitation) (err error)
- type IYOPhonenumberValidationService
- func (service *IYOPhonenumberValidationService) ConfirmRegistrationValidation(r *http.Request, key, code string) (err error)
- 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)
- func (service *IYOPhonenumberValidationService) SendOrganizationInviteSms(request *http.Request, invite *invitations.JoinOrganizationInvitation) (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(recipients []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) ConfirmRegistrationValidation ¶ added in v1.0.0
func (service *IYOEmailAddressValidationService) ConfirmRegistrationValidation(r *http.Request, key, secret string) (err error)
ConfirmRegistrationValidation checks if the supplied code matches the username and key. It does not add an entry in the validated email addresses collection
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, langKey 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, langKey string) (key string, err error)
RequestValidation validates the email address by sending an email
func (*IYOEmailAddressValidationService) SendOrganizationInviteEmail ¶
func (service *IYOEmailAddressValidationService) SendOrganizationInviteEmail(request *http.Request, invite *invitations.JoinOrganizationInvitation) (err error)
SendOrganizationInviteEmail Sends an organization invite email
type IYOPhonenumberValidationService ¶
type IYOPhonenumberValidationService struct {
SMSService SMSService
}
IYOPhonenumberValidationService is the itsyou.online implementation of a PhonenumberValidationService
func (*IYOPhonenumberValidationService) ConfirmRegistrationValidation ¶ added in v1.0.0
func (service *IYOPhonenumberValidationService) ConfirmRegistrationValidation(r *http.Request, key, code string) (err error)
ConfirmRegistrationValidation confirms a validation in the registartion flow. It does not add an entry in the validated phone numbers collection
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, langKey string) (key string, err error)
RequestValidation validates the phonenumber by sending an SMS
func (*IYOPhonenumberValidationService) SendOrganizationInviteSms ¶
func (service *IYOPhonenumberValidationService) SendOrganizationInviteSms(request *http.Request, invite *invitations.JoinOrganizationInvitation) (err error)
SendOrganizationInviteSms Sends an organization invite SMS
type SMSService ¶
SMSService is the interface an sms communication channel should have to be used by the IYOPhonenumberValidationService