user

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(field string, value string, password string) maps.Map

Auth 用户身份鉴权

func MakeCaptcha

func MakeCaptcha(option CaptchaOption) (string, string)

MakeCaptcha 制作验证码

func ProcessCaptcha

func ProcessCaptcha(process *gou.Process) interface{}

ProcessCaptcha xiang.user.Captcha 验证码

func ProcessInfo

func ProcessInfo(process *gou.Process) interface{}

ProcessInfo xiang.user.Info 读取当前用户资料

func ProcessLogin

func ProcessLogin(process *gou.Process) interface{}

ProcessLogin xiang.user.Login 用户登录

func ProcessToken

func ProcessToken(process *gou.Process) interface{}

ProcessToken xiang.user.Token 使用 Key & Secret 换取 Token

func ProcessTokenRefresh

func ProcessTokenRefresh(process *gou.Process) interface{}

ProcessTokenRefresh xiang.user.TokenRefresh 刷新Token

func ValidateCaptcha

func ValidateCaptcha(id string, value string) bool

ValidateCaptcha 校验验证码

Types

type CaptchaOption

type CaptchaOption struct {
	Type       string
	Height     int
	Width      int
	Length     int
	Lang       string
	Background string
}

CaptchaOption 验证码配置

func NewCaptchaOption

func NewCaptchaOption() CaptchaOption

NewCaptchaOption 创建验证码配置

type JwtClaims

type JwtClaims struct {
	ID   int
	Type string
	Name string
	jwt.StandardClaims
}

JwtClaims JWT claims

Jump to

Keyboard shortcuts

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