Documentation
¶
Index ¶
- type Handler
- func (h *Handler) ActivateUser(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ChangeUserPassword(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateUserAccessToken(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteUserAccessToken(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ReadUser(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ResendUserEmailAddressVerificationEmail(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ResetUserPassword(w http.ResponseWriter, r *http.Request)
- func (h *Handler) SendUserPasswordRecoveryEmail(w http.ResponseWriter, r *http.Request)
- func (h *Handler) SignUp(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UpdateUser(w http.ResponseWriter, r *http.Request)
- func (h *Handler) VerifyUserEmailAddress(w http.ResponseWriter, r *http.Request)
- type NewParams
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 (*Handler) ActivateUser ¶
func (h *Handler) ActivateUser(w http.ResponseWriter, r *http.Request)
ActivateUser godoc @Description Activate user with the activation token. @Failure 400 {object} responder.DetailResponse @Router /authentication/activate-user [post] @Success 200 {object} poeticmetric.AuthenticationUser @Summary Activate user @Tags authentication
func (*Handler) ChangeUserPassword ¶
func (h *Handler) ChangeUserPassword(w http.ResponseWriter, r *http.Request)
ChangeUserPassword godoc @Description Change currently authenticated user's password. @Failure 400 {object} responder.DetailResponse @Router /authentication/change-user-password [post] @Security BasicAuthentication @Success 200 {object} responder.DetailResponse @Summary Change password @Tags authentication
func (*Handler) CreateUserAccessToken ¶
func (h *Handler) CreateUserAccessToken(w http.ResponseWriter, r *http.Request)
CreateUserAccessToken godoc @Description Create a user access token by authenticating with the e-mail address and password. @Failure 400 {object} responder.DetailResponse @Router /authentication/user-access-tokens [post] @Security BasicAuthentication @Success 201 {object} poeticmetric.AuthenticationUserAccessToken @Summary Create user access token @Tags authentication
func (*Handler) DeleteUserAccessToken ¶
func (h *Handler) DeleteUserAccessToken(w http.ResponseWriter, r *http.Request)
DeleteUserAccessToken godoc @Description Delete user access token currently in use. @Failure 400 {object} responder.DetailResponse @Router /authentication/user-access-tokens [delete] @Security UserAccessTokenAuthentication @Success 204 @Summary Delete user access token @Tags authentication
func (*Handler) ReadUser ¶
func (h *Handler) ReadUser(w http.ResponseWriter, r *http.Request)
ReadUser godoc @Description Read currently authenticated user. @Failure 400 {object} responder.DetailResponse @Router /authentication/user [get] @Security UserAccessTokenAuthentication @Success 200 {object} poeticmetric.AuthenticationUser @Summary Read user @Tags authentication
func (*Handler) ResendUserEmailAddressVerificationEmail ¶
func (h *Handler) ResendUserEmailAddressVerificationEmail(w http.ResponseWriter, r *http.Request)
ResendUserEmailAddressVerificationEmail godoc @Description Resend the e-mail with the e-mail address verification code to the user. @Failure 400 {object} responder.DetailResponse @Router /authentication/resend-user-email-address-verification-email [post] @Success 200 {object} responder.DetailResponse @Summary Resend user e-mail address verification e-mail @Tags authentication
func (*Handler) ResetUserPassword ¶
func (h *Handler) ResetUserPassword(w http.ResponseWriter, r *http.Request)
ResetUserPassword godoc @Description Reset user's password also deleting all existing user access tokens for that user. @Failure 422 {object} poeticmetric.ResetUserPasswordParams @Param params body poeticmetric.ResetUserPasswordParams true "Params" @Router /authentication/reset-user-password [post] @Success 200 {object} responder.DetailResponse @Summary Reset user's password @Tags authentication
func (*Handler) SendUserPasswordRecoveryEmail ¶
func (h *Handler) SendUserPasswordRecoveryEmail(w http.ResponseWriter, r *http.Request)
SendUserPasswordRecoveryEmail godoc @Description Send a password recovery e-mail to the user. @Param params body poeticmetric.SendUserPasswordRecoveryEmailParams true "Params" @Router /authentication/send-user-password-recovery-email [post] @Success 201 {object} responder.DetailResponse @Summary Send user password recovery e-mail @Tags authentication
func (*Handler) SignUp ¶
func (h *Handler) SignUp(w http.ResponseWriter, r *http.Request)
SignUp godoc @Description Sign up a new user. @Failure 400 {object} responder.DetailResponse @Router /authentication/sign-up [post] @Success 201 {object} poeticmetric.AuthenticationUser @Summary Sign up @Tags authentication
func (*Handler) UpdateUser ¶
func (h *Handler) UpdateUser(w http.ResponseWriter, r *http.Request)
UpdateUser godoc @Description Update currently authenticated user. @Failure 400 {object} responder.DetailResponse @Router /authentication/user [patch] @Security UserAccessTokenAuthentication @Success 200 {object} poeticmetric.AuthenticationUser @Summary Update user @Tags authentication
func (*Handler) VerifyUserEmailAddress ¶
func (h *Handler) VerifyUserEmailAddress(w http.ResponseWriter, r *http.Request)
VerifyUserEmailAddress godoc @Description Verify user's e-mail address by the verification code. @Failure 400 {object} responder.DetailResponse @Router /authentication/verify-user-email-address [patch] @Security UserAccessTokenAuthentication @Success 200 {object} poeticmetric.AuthenticationUser @Summary Verify user e-mail address @Tags authentication
type NewParams ¶
type NewParams struct {
AuthenticationService poeticmetric.AuthenticationService
Responder poeticmetric.RestApiResponder
}