users

package
v0.0.0-...-4b2473b Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoginUser

func LoginUser(c *gin.Context)

LoginUser godoc @Summary Authenticate a user @Schemes @Description Authenticates a user using username and password, returns a JWT token if successful @Tags User @Security ApiKeyAuth @Accept json @Produce json @Param user body models.LoginUser true "User login object" @Success 200 {string} string "JWT Token" @Failure 400 {string} string "Bad Request" @Failure 401 {string} string "Unauthorized" @Failure 500 {string} string "Internal Server Error" @Router /login [post]

func RegisterUser

func RegisterUser(c *gin.Context)

RegisterUser godoc @Summary Register a new user @Schemes http @Description Registers a new user with the given username and password @Tags User @Security ApiKeyAuth @Accept json @Produce json @Param user body models.LoginUser true "User registration object" @Success 200 {string} string "Successfully registered" @Failure 400 {string} string "Bad Request" @Failure 500 {string} string "Internal Server Error" @Router /register [post]

Types

This section is empty.

Jump to

Keyboard shortcuts

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