userApi

package
v0.0.0-...-7dcfe9a Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangePassword

func ChangePassword(ctx iris.Context)

ChangePassword

修改密码 need:old & new

func ChangePasswordWithKey

func ChangePasswordWithKey(ctx iris.Context)

ChangePasswordWithKey

使用授权key修改密码 need:key & new

key: means that program has auth to change passwd

func GenUserInfo

func GenUserInfo(ctx iris.Context)

func Logout

func Logout(ctx iris.Context)

func ResetPassword

func ResetPassword(ctx iris.Context)

ResetPassword

使用授权key重置密码

func ResetPwd

func ResetPwd(ctx iris.Context)

ResetPwd

管理员重置密码

func SignIn

func SignIn(ctx iris.Context)

func SignInCard

func SignInCard(ctx iris.Context)

Types

type JwtCache

type JwtCache struct {
	Uid   int
	OrgId int
}

type PasswordReq

type PasswordReq struct {
	Uid int    `json:"uid"`
	Old string `json:"old"`
	New string `json:"new"`
}

type PasswordResetReq

type PasswordResetReq struct {
	Uid      int    `json:"uid"`
	Key      string `json:"key"` // passwd:reset:{uuid} = uid
	Password string `json:"password,omitempty"`
}

type PasswordResetResp

type PasswordResetResp struct {
	app.Response
	Uid      int    `json:"uid"`
	Password string `json:"password,omitempty"`
}

type Req

type Req struct {
	Uid       int    `json:"uid,omitempty"`
	LoginName string `json:"loginName,omitempty"`
	Password  string `json:"password,omitempty"`
}

type Resp

type Resp struct {
	app.Response
	Jwt   string `json:"jwt,omitempty"`
	Uid   int    `json:"uid,omitempty"`
	OrgId int    `json:"orgId,omitempty"`
	Roles []int  `json:"roles,omitempty"`
}

Jump to

Keyboard shortcuts

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