Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthHandler ¶
type AuthHandler struct {
// contains filtered or unexported fields
}
func New ¶
func New(auth *auth.AuthService) *AuthHandler
func (*AuthHandler) AuthTokenUI ¶ added in v0.8.4
func (h *AuthHandler) AuthTokenUI(ctx *gin.Context)
func (*AuthHandler) OTPRequest ¶
func (h *AuthHandler) OTPRequest(ctx *gin.Context)
func (*AuthHandler) OTPVerify ¶
func (h *AuthHandler) OTPVerify(ctx *gin.Context)
func (*AuthHandler) Refresh ¶
func (h *AuthHandler) Refresh(ctx *gin.Context)
type OTPRequest ¶
type OTPRequest struct {
Email string `json:"email" binding:"required"`
}
OTPRequest is the request for an OTP code to be sent to the user's email.
type OTPRequestResponse ¶
type OTPRequestResponse struct {
Email string `json:"email"`
}
OTPRequestResponse is the response for an OTP code to be sent to the user's email.
type OTPVerifyRequest ¶
type OTPVerifyRequest struct {
Email string `json:"email" binding:"required"`
Code string `json:"code" binding:"required"`
}
OTPVerifyRequest is the request for a verified OTP code.
type OTPVerifyResponse ¶
type OTPVerifyResponse RefreshResponse
OTPVerifyResponse is the response for a verified OTP code.
type RefreshRequest ¶
type RefreshRequest struct {
OldRefreshToken string `json:"refreshToken" binding:"required"`
}
RefreshRequest is the request for a new access token.
type RefreshResponse ¶
type RefreshResponse struct {
AccessToken string `json:"accessToken"`
RefreshToken string `json:"refreshToken"`
}
RefreshResponse is the response for a new access token.
Click to show internal directories.
Click to hide internal directories.