auth_handles

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2022 License: Apache-2.0 Imports: 9 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handles

type Handles struct {
	// contains filtered or unexported fields
}

func NewHandles

func NewHandles(conf *conf.AppConfig, auth service.AuthSrv) *Handles

func (*Handles) CheckAccessToken

func (h *Handles) CheckAccessToken(g *gin.Context)

func (*Handles) CreateCodeOpenId

func (h *Handles) CreateCodeOpenId(g *gin.Context)

func (*Handles) CreateToken

func (h *Handles) CreateToken(g *gin.Context)

CreateToken appid 是 唯一标识 secret 是 secret code 是 填写第一步获取的code参数 grant_type 是 填写为authorization_code

func (*Handles) GetUid

func (h *Handles) GetUid(g *gin.Context) int

func (*Handles) RefreshAccessToken

func (h *Handles) RefreshAccessToken(g *gin.Context)

RefreshAccessToken appid 是 唯一标识 grant_type 是 填写为 refresh_token refresh_token 是 填写通过access_token获取到的refresh_token参数

func (*Handles) ResponseData

func (h *Handles) ResponseData(g *gin.Context, data interface{})

func (*Handles) ResponseErr

func (h *Handles) ResponseErr(g *gin.Context, err error)

func (*Handles) ResponseSuccess

func (h *Handles) ResponseSuccess(g *gin.Context)

func (*Handles) UserInfo

func (h *Handles) UserInfo(g *gin.Context)

Jump to

Keyboard shortcuts

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