captchahandlers

package
v0.0.0-...-851e7b8 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CaptchaHandlers

type CaptchaHandlers struct {
	*basichandlers.Basic
}

CaptchaHandlers defined for captcha APIs

func (*CaptchaHandlers) Create

func (ctrl *CaptchaHandlers) Create() gin.HandlerFunc

Create captcha API 生成验证码,每次加载都是新的验证码 由于不适用session 所以需要给用户反馈captcha id这样用来校验 校验直接在中间件中进行,如果需要进行校验的部分直接在路由中定义 该方法仅支持生成图片验证码 @Summary 创建图形验证啊 @Tags 验证码 @Description 图形验证码创建后会返回base64 encode的图形验证码数据,和captcha-id 需要在校验的时候一并进行传回 @Accept json @Produce json @Success 200 "{"code":200,"data":{"captcha": {"captcha-id": 123456, "captcha-data": ""}},"message":"操作成功"}" @Router /captcha/create [get]

Jump to

Keyboard shortcuts

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