auth

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Login

func Login(authSvc *authsvc.Service) fiber.Handler

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]

func Routes

func Routes(app *fiber.App, authSvc *authsvc.Service)

Routes registers HTTP routes for authentication operations. Sets up endpoints for user login and authentication.

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.

Jump to

Keyboard shortcuts

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