login

package
v0.0.145 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterLoginRoutes added in v0.0.145

func RegisterLoginRoutes(auth *gin.RouterGroup)

Types

type Controller added in v0.0.145

type Controller struct{}

func (*Controller) LoginByPassword added in v0.0.145

func (lc *Controller) LoginByPassword(c *gin.Context)

验证用户名和密码 1、从cfg中获取用户名,先判断是不是admin,是进行密码比对.必须启用临时管理员配置才进行这一步 2、从DB中获取用户名密码

type Request added in v0.0.145

type Request struct {
	Username  string `json:"username" binding:"required"`
	Password  string `json:"password" binding:"required"`
	LoginType int    `json:"loginType"` // 0: 普通登录, 1: LDAP登录
	Code      string `json:"code"`
}

Request 用户结构体

Jump to

Keyboard shortcuts

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