auth

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2024 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindAuth

func BindAuth(app *application.App, simple *Simple)

Types

type LoginJsonBody

type LoginJsonBody struct {
	UserName string `json:"userName" binding:"required"`
	Password string `json:"password" binding:"required"`
}

type Simple

type Simple struct {
	// schema
	Schema string

	// AES加密用到的Key
	AESKey string

	// JWT的Key
	JWTSecretKey string

	// JWT到期时间
	JWTExpiredSec int64

	// 鉴权中间件
	AuthMiddleware binding.Middleware

	// 管理员用户密码
	AdminUserPassword string
}

Simple Bind参数

type UserWithRoleInfo

type UserWithRoleInfo struct {
	UserInfo  user.Info
	RoleInfos []role.Info
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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