auth

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	*wechatCxt.Context
}

Auth 登录/用户信息

func NewAuth

func NewAuth(ctx *wechatCxt.Context) *Auth

NewAuth new auth

func (*Auth) Code2Session

func (auth *Auth) Code2Session(jsCode string) (result ResCode2Session, err error)

Code2Session 登录凭证校验。

func (*Auth) Code2SessionContext

func (auth *Auth) Code2SessionContext(ctx context.Context, jsCode string) (result ResCode2Session, err error)

Code2SessionContext 登录凭证校验。

type ResCode2Session

type ResCode2Session struct {
	response.ErrorModel
	OpenID     string `json:"openid"`      // 用户唯一标识
	SessionKey string `json:"session_key"` // 会话密钥
	UnionID    string `json:"unionid"`     // 用户在开放平台的唯一标识符,在满足UnionID下发条件的情况下会返回
}

ResCode2Session 登录凭证校验的返回结果

type RspCheckEncryptedData

type RspCheckEncryptedData struct {
	response.ErrorModel
	Vaild      bool `json:"vaild"`       // 是否是合法的数据
	CreateTime uint `json:"create_time"` // 加密数据生成的时间戳
}

RspCheckEncryptedData .

Jump to

Keyboard shortcuts

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