handler

package
v0.0.0-...-459e612 Latest Latest
Warning

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

Go to latest
Published: May 19, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WechatValidationEndpoint = "https://api.weixin.qq.com/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthCenter

type AuthCenter struct{}

WechatAuth ...

func (*AuthCenter) GenerateTokens

func (a *AuthCenter) GenerateTokens(ctx context.Context, req *auth.GetTokensRequest, rsp *auth.GetTokensResponse) error

GenerateTokens ...

func (*AuthCenter) RefreshJWTToken

func (a *AuthCenter) RefreshJWTToken(ctx context.Context, req *auth.RefreshJWTRequest, rsp *auth.RefreshJWTResponse) error

RefreshJWTToken ...

func (*AuthCenter) VerifyWechatCode

VerifyWechatCode 校验登录凭证

type Code2SessionResp

type Code2SessionResp struct {
	OpenID     string `json:"openid"`      // 用户唯一标识
	SessionKey string `json:"session_key"` // 会话密钥
	UnionID    string `json:"unionid"`     // 用户在开放平台的唯一标识符,在满足 UnionID 下发条件的情况下会返回,详见 UnionID 机制说明 https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/union-id.html
	ErrCode    int64  `json:"errcode"`     // 错误码
	ErrMsg     string `json:"errmsg"`      // 错误信息
}

Jump to

Keyboard shortcuts

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