Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Login ¶
Login handles user authentication and returns a JWT token. @Summary User login @Description Authenticate user with identity (username or email) and password @Tags auth @Accept json @Produce json @Param request body LoginInput true "Login credentials" @Success 200 {object} common.Response @Failure 400 {object} common.ProblemDetails @Failure 401 {object} common.ProblemDetails @Failure 429 {object} common.ProblemDetails @Failure 500 {object} common.ProblemDetails @Router /auth/login [post]
Types ¶
type LoginInput ¶
type LoginInput struct {
Identity string `json:"identity" validate:"required"`
Password string `json:"password" validate:"required"`
}
LoginInput represents the request body for user authentication.
Click to show internal directories.
Click to hide internal directories.