Documentation
¶
Index ¶
- type AuthenticationController
- func (h *AuthenticationController) CheckRecoveryCode(c fuego.Context[FormRecoveryCode, struct{}]) (*SuccessResponse, error)
- func (h *AuthenticationController) ForgotPassword(c fuego.Context[FormUser, struct{}]) (*ForgotPasswordResponse, error)
- func (h *AuthenticationController) LogIn(c fuego.Context[FormUser, struct{}]) (*LoginResponse, error)
- func (h *AuthenticationController) PasswordReset(c fuego.Context[FormResetPassword, struct{}]) (*SuccessResponse, error)
- func (h *AuthenticationController) RegenerateAuthToken(c fuego.ContextNoBody) (*LoginResponse, error)
- func (h *AuthenticationController) SignUp(c fuego.Context[FormUser, struct{}]) (*SuccessResponse, error)
- func (h *AuthenticationController) VerifyUser(c fuego.ContextNoBody) (*SuccessResponse, error)
- type ForgotPasswordResponse
- type FormEditEmail
- type FormEditPassword
- type FormEditUsername
- type FormRecoveryCode
- type FormResetPassword
- type FormUser
- type LoginResponse
- type RegisterRequest
- type SuccessResponse
- type UserEditionController
- func (ctrl UserEditionController) EditUserEmail(c fuego.Context[FormEditEmail, struct{}]) (*SuccessResponse, error)
- func (ctrl UserEditionController) EditUserPassword(c fuego.Context[FormEditPassword, struct{}]) (*SuccessResponse, error)
- func (ctrl UserEditionController) EditUsername(c fuego.Context[FormEditUsername, struct{}]) (*SuccessResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthenticationController ¶
type AuthenticationController struct {
web.DefaultController
// contains filtered or unexported fields
}
func NewAuthController ¶
func NewAuthController( secretKey *rsa.PrivateKey, authServ authserv.AuthService, ) AuthenticationController
func (*AuthenticationController) CheckRecoveryCode ¶
func (h *AuthenticationController) CheckRecoveryCode( c fuego.Context[FormRecoveryCode, struct{}], ) (*SuccessResponse, error)
func (*AuthenticationController) ForgotPassword ¶
func (h *AuthenticationController) ForgotPassword( c fuego.Context[FormUser, struct{}], ) (*ForgotPasswordResponse, error)
func (*AuthenticationController) LogIn ¶
func (h *AuthenticationController) LogIn( c fuego.Context[FormUser, struct{}], ) (*LoginResponse, error)
func (*AuthenticationController) PasswordReset ¶
func (h *AuthenticationController) PasswordReset( c fuego.Context[FormResetPassword, struct{}], ) (*SuccessResponse, error)
func (*AuthenticationController) RegenerateAuthToken ¶
func (h *AuthenticationController) RegenerateAuthToken( c fuego.ContextNoBody, ) (*LoginResponse, error)
func (*AuthenticationController) SignUp ¶
func (h *AuthenticationController) SignUp( c fuego.Context[FormUser, struct{}], ) (*SuccessResponse, error)
func (*AuthenticationController) VerifyUser ¶
func (h *AuthenticationController) VerifyUser( c fuego.ContextNoBody, ) (*SuccessResponse, error)
type ForgotPasswordResponse ¶
type ForgotPasswordResponse struct {
SuccessResponse
ObfuscatedEmail string `json:"obfuscatedEmail,omitempty"`
}
ForgotPasswordResponse represents the response for password recovery initiation.
type FormEditEmail ¶
type FormEditEmail struct {
CurrentPassword string `json:"current_password"`
NewEmail string `json:"new_email"`
}
FormEditEmail represents the request to edit user email.
type FormEditPassword ¶
type FormEditPassword struct {
CurrentPassword string `json:"current_password"`
NewPassword string `json:"new_password"`
}
FormEditPassword represents the request to edit user password.
type FormEditUsername ¶
type FormEditUsername struct {
CurrentPassword string `json:"current_password"`
NewUsername string `json:"new_username"`
}
FormEditUsername represents the request to edit user username.
type FormRecoveryCode ¶
type FormRecoveryCode struct {
Email string `json:"email"`
RecoveryCode string `json:"recovery_code"`
}
FormRecoveryCode represents the request with recovery code.
type FormResetPassword ¶
type FormResetPassword struct {
Email string `json:"email"`
RecoveryCode string `json:"recovery_code"`
NewPassword string `json:"new_password"`
}
FormResetPassword represents the request to reset password.
type FormUser ¶
type FormUser struct {
Username string `json:"username"`
Email string `json:"email" validate:"required,email"`
Password string `json:"password" validate:"required"`
}
FormUser represents the user form for signup/login.
type LoginResponse ¶
type LoginResponse struct {
Token string `json:"token"`
}
LoginResponse represents the response when logging in.
type RegisterRequest ¶
type RegisterRequest struct {
FullName string `json:"fullname" validate:"required"`
Email string `json:"email" validate:"required,email"`
InviteCode string `json:"inviteCode,omitempty"`
}
RegisterRequest represents the request to register.
type SuccessResponse ¶
type SuccessResponse struct {
Success bool `json:"success"`
Message string `json:"message,omitempty"`
}
SuccessResponse represents a successful operation response.
type UserEditionController ¶
type UserEditionController struct {
web.DefaultController
// contains filtered or unexported fields
}
func NewUserEditionController ¶
func NewUserEditionController( mailerService authserv.MailerService, userRepository authserv.UserAuthRepository, userEditionRepository userserv.UserEditionRepository, ) UserEditionController
func (UserEditionController) EditUserEmail ¶
func (ctrl UserEditionController) EditUserEmail( c fuego.Context[FormEditEmail, struct{}], ) (*SuccessResponse, error)
func (UserEditionController) EditUserPassword ¶
func (ctrl UserEditionController) EditUserPassword( c fuego.Context[FormEditPassword, struct{}], ) (*SuccessResponse, error)
func (UserEditionController) EditUsername ¶
func (ctrl UserEditionController) EditUsername( c fuego.Context[FormEditUsername, struct{}], ) (*SuccessResponse, error)
Click to show internal directories.
Click to hide internal directories.