account

package
v0.0.0-...-46e61fc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewAccountHandler

func NewAccountHandler(useCases accountUseCases.IUseCases, controller accountController.IController,
	appConfig app.IConfig) *Handler

func (*Handler) ChangePassword

func (h *Handler) ChangePassword(w http.ResponseWriter, r *http.Request)

@Tags Account @Description Update account password @ID change-password @Accept json @Produce json @Param ChangePasswordData body accountEntities.ChangePasswordData true "change password data" @Success 204 {object} entities.Response @Failure 400 {object} entities.Response @Failure 500 {object} entities.Response @Router /auth/account/change-password [post] @Security ApiKeyAuth

func (*Handler) CheckExistingEmailOrUsername

func (h *Handler) CheckExistingEmailOrUsername(w http.ResponseWriter, r *http.Request)

@Tags Account @Description Verify username or email already in use @ID verify-email-username @Accept json @Produce json @Param CheckEmailAndUsername body accountEntities.CheckEmailAndUsername true "check already in use email username" @Success 200 {object} entities.Response @Failure 400 {object} entities.Response @Failure 500 {object} entities.Response @Router /auth/account/verify-already-used [post] @Security ApiKeyAuth

func (*Handler) CheckResetPasswordCode

func (h *Handler) CheckResetPasswordCode(w http.ResponseWriter, r *http.Request)

@Tags Account @Description Check for valid reset password code @ID check-reset-password-code @Accept json @Produce json @Param ResetCodeData body accountEntities.ResetCodeData true "reset password code" @Success 200 {object} entities.Response @Failure 400 {object} entities.Response @Failure 403 {object} entities.Response @Failure 500 {object} entities.Response @Router /auth/account/check-reset-code [post] @Security ApiKeyAuth

func (*Handler) CreateAccountHorusec

func (h *Handler) CreateAccountHorusec(w http.ResponseWriter, r *http.Request)

@Tags Account @Description Create account when horusec auth @ID create-account-horusec @Accept json @Produce json @Param AccountData body accountEntities.Data true "create account with horusec data" @Success 200 {object} entities.Response @Failure 400 {object} entities.Response @Failure 500 {object} entities.Response @Router /auth/account/create-account-horusec [post] @Security ApiKeyAuth

func (*Handler) CreateAccountKeycloak

func (h *Handler) CreateAccountKeycloak(w http.ResponseWriter, r *http.Request)

@Tags Account @Description Create account when keycloak auth @ID create-account-keycloak @Accept json @Produce json @Param AccessToken body accountEntities.AccessToken true "create account with keycloak data" @Success 200 {object} entities.Response @Failure 400 {object} entities.Response @Failure 500 {object} entities.Response @Router /auth/account/create-account-keycloak [post] @Security ApiKeyAuth

func (*Handler) DeleteAccount

func (h *Handler) DeleteAccount(w http.ResponseWriter, r *http.Request)

@Tags Account @Description Delete your account @ID delete-account @Accept json @Produce json @Success 204 {object} entities.Response @Failure 401 {object} entities.Response @Failure 500 {object} entities.Response @Router /auth/account/delete [delete] @Security ApiKeyAuth

func (*Handler) Logout

func (h *Handler) Logout(w http.ResponseWriter, r *http.Request)

@Tags Account @Description Refresh access token @ID logout @Accept json @Produce json @Param RefreshToken body accountEntities.RefreshToken true "refresh token data" @Success 204 {object} entities.Response @Failure 400 {object} entities.Response @Router /auth/account/logout [post] @Security ApiKeyAuth

func (*Handler) Options

func (h *Handler) Options(w http.ResponseWriter, _ *http.Request)

func (*Handler) RefreshToken

func (h *Handler) RefreshToken(w http.ResponseWriter, r *http.Request)

@Tags Account @Description Refresh access token @ID refresh-token @Accept json @Produce json @Param RefreshToken body accountEntities.RefreshToken true "refresh token data" @Success 200 {object} entities.Response @Failure 400 {object} entities.Response @Failure 401 {object} entities.Response @Router /auth/account/refresh-token [post] @Security ApiKeyAuth

func (*Handler) SendResetPasswordCode

func (h *Handler) SendResetPasswordCode(w http.ResponseWriter, r *http.Request)

@Tags Account @Description Send a reset password code email @ID reset-password-code @Accept json @Produce json @Param Email body accountEntities.Email true "email data" @Success 204 {object} entities.Response @Failure 400 {object} entities.Response @Failure 500 {object} entities.Response @Router /auth/account/send-reset-code [post] @Security ApiKeyAuth

func (*Handler) UpdateAccount

func (h *Handler) UpdateAccount(w http.ResponseWriter, r *http.Request)

@Tags Account @Description Update account data @ID update-account @Accept json @Produce json @Param UpdateAccount body accountEntities.UpdateAccount true "update account data" @Success 200 {object} entities.Response @Failure 400 {object} entities.Response @Failure 500 {object} entities.Response @Router /auth/account/update [patch] @Security ApiKeyAuth

func (*Handler) ValidateAccountEmail

func (h *Handler) ValidateAccountEmail(w http.ResponseWriter, r *http.Request)

@Tags Account @Description Validate account email @ID validate-account-email @Accept json @Produce json @Param accountID path string true "ID of the account" @Success 304 {object} entities.Response @Failure 400 {object} entities.Response @Failure 500 {object} entities.Response @Router /auth/account/validate/{accountID} [get] @Security ApiKeyAuth

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL