middle

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Auth = authType{}
View Source
var Captcha = captchaType{}

Functions

func ApiTokenPersistentHandler

func ApiTokenPersistentHandler(token *models.ApiToken) error

func IsApiTokenValid

func IsApiTokenValid(token string) (*models.ApiToken, error)

IsApiTokenValid 检查API令牌是否有效

func JwtPersistentHandler

func JwtPersistentHandler(userID uint) (*models.JsonWebToken, error)

JwtPersistentHandler 持久化处理函数,使用依赖注入到 utils 中防止循环引用

func RevokeChecker

func RevokeChecker(tokenID uint) bool

RevokeChecker 令牌撤销检查器,使用依赖注入到 utils 中防止循环引用

Types

type CaptchaReq

type CaptchaReq struct {
	CaptchaToken string `json:"captcha_token"` // Captcha Token
}

Jump to

Keyboard shortcuts

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