auth

package
v0.0.0-...-269099d Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Login

func Login(c *gin.Context)

@Summary Login @Tags User @Description 登录 @accept json @Produce json @Param auth body Auth true "用户/密码" @Success 200 {object} msg.Response @Failure 200 {object} msg.Response @Router /api/v1/user/login [post]

func Logout

func Logout(c *gin.Context)

@Summary Logout @Tags User @Description 登出 @Produce json @Security token @Success 200 {object} msg.Response @Failure 200 {object} msg.Response @Router /api/v1/user/logout [get]

func Reset

func Reset(c *gin.Context)

@Summary Reset Password @Tags User @Description 重置密码 @accept json @Produce json @Param resetpwd body ResetPwd true "旧/新密码" @Success 200 {object} msg.Response @Failure 200 {object} msg.Response @Router /api/v1/self/resetpwd/ [post]

func Self

func Self(c *gin.Context)

@Summary Self @Tags User @Description 获取个人信息 @Produce json @Security token @Success 200 {object} msg.Response @Failure 200 {object} msg.Response @Router /api/v1/user/info [get]

Types

type Auth

type Auth struct {
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
}

type ResetPwd

type ResetPwd struct {
	Password    string `json:"password" binding:"required"`
	NewPassword string `json:"newpassword" binding:"required"`
}

Jump to

Keyboard shortcuts

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