Documentation ¶
Index ¶
- Variables
- func NewAuthService(us anor.UserService, e emailer.Emailer, cacher cache.ResetPasswordTokenCacher) anor.AuthService
- func RegisterRoutes(h *Handler, mux *http.ServeMux)
- type BindValidator
- type Binder
- type Handler
- func (h *Handler) ForgotPasswordView(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ResendOTP(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ResetPassword(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ResetPasswordView(w http.ResponseWriter, r *http.Request)
- func (h *Handler) SendResetPasswordLink(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Signin(w http.ResponseWriter, r *http.Request)
- func (h *Handler) SigninView(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Signup(w http.ResponseWriter, r *http.Request)
- func (h *Handler) SignupConfirmation(w http.ResponseWriter, r *http.Request)
- func (h *Handler) SignupView(w http.ResponseWriter, r *http.Request)
- type ResendOTPForm
- type ResetPasswordForm
- type SendResetPasswordLinkForm
- type SigninForm
- type SignupConfirmationForm
- type SignupForm
- type Validator
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmailAlreadyTaken = errors.New("Email already taken") ErrInvalidCredentials = errors.New("Invalid credentials") ErrInvalidOTP = errors.New("Invalid OTP") ErrExpiredOTP = errors.New("Expired OTP") ErrEmailNotConfirmed = errors.New("Email not confirmed") ErrAccountBlocked = errors.New("Account blocked") ErrAccountInactive = errors.New("Account inactive") ErrInvalidOrExpiredResetURL = errors.New("Invalid or expired reset URL") )
Functions ¶
func NewAuthService ¶
func NewAuthService(us anor.UserService, e emailer.Emailer, cacher cache.ResetPasswordTokenCacher) anor.AuthService
func RegisterRoutes ¶
Types ¶
type BindValidator ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) ForgotPasswordView ¶
func (h *Handler) ForgotPasswordView(w http.ResponseWriter, r *http.Request)
func (*Handler) ResetPassword ¶
func (h *Handler) ResetPassword(w http.ResponseWriter, r *http.Request)
func (*Handler) ResetPasswordView ¶
func (h *Handler) ResetPasswordView(w http.ResponseWriter, r *http.Request)
func (*Handler) SendResetPasswordLink ¶
func (h *Handler) SendResetPasswordLink(w http.ResponseWriter, r *http.Request)
func (*Handler) SigninView ¶
func (h *Handler) SigninView(w http.ResponseWriter, r *http.Request)
func (*Handler) SignupConfirmation ¶
func (h *Handler) SignupConfirmation(w http.ResponseWriter, r *http.Request)
func (*Handler) SignupView ¶
func (h *Handler) SignupView(w http.ResponseWriter, r *http.Request)
type ResendOTPForm ¶
type ResendOTPForm struct {
Email string
}
func (*ResendOTPForm) Validate ¶
func (f *ResendOTPForm) Validate() error
type ResetPasswordForm ¶
func (*ResetPasswordForm) Validate ¶
func (f *ResetPasswordForm) Validate() error
type SendResetPasswordLinkForm ¶
type SendResetPasswordLinkForm struct {
Email string
}
func (*SendResetPasswordLinkForm) Bind ¶
func (f *SendResetPasswordLinkForm) Bind(r *http.Request) error
func (*SendResetPasswordLinkForm) Validate ¶
func (f *SendResetPasswordLinkForm) Validate() error
type SigninForm ¶
func (*SigninForm) Validate ¶
func (f *SigninForm) Validate() error
type SignupConfirmationForm ¶
func (*SignupConfirmationForm) Validate ¶
func (f *SignupConfirmationForm) Validate() error
type SignupForm ¶
func (*SignupForm) Validate ¶
func (f *SignupForm) Validate() error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.