auth

package
v0.0.0-...-49281bb Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoginAuth

func LoginAuth(c *gin.Context)

LoginAuth @Tags 登录认证 @Summary 登录 @Description 登录 @Produce json @Param payload body Params true "参数信息" @Success 200 object response.Data {"code": 2000, "status": "ok", "message": "success", "data": ""} @Failure 400 object response.Data {"code": 4001, "status": "error", "message": "error", "data": ""} @Router /api/v1/login [post]

func RefreshToken

func RefreshToken(c *gin.Context)

RefreshToken @Tags 登录认证 @Summary 刷新Token @Description 刷新Token @Produce json @Param payload body RefreshParams true "参数信息" @Success 200 object response.Data {"code": 2000, "status": "ok", "message": "success", "data": ""} @Failure 400 object response.Data {"code": 4001, "status": "error", "message": "error", "data": ""} @Router /api/v1/refresh-token [post]

func TokenMethod

func TokenMethod(tokenApi goJWT.JWTAuth, cla jwt.MapClaims, expired int) (map[string]interface{}, error)

Types

type Params

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

type RefreshParams

type RefreshParams struct {
	Token string `json:"token" binding:"required"`
}

Jump to

Keyboard shortcuts

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