wechat

package module
v0.0.0-...-b5dde4e Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	LogoSVG      = `` /* 1764-byte string literal not displayed */
	AuthorizeURL = "https://open.weixin.qq.com/connect/oauth2/authorize"
	TokenURL     = "https://api.weixin.qq.com/sns/oauth2/access_token"
	UserInfoURL  = "https://api.weixin.qq.com/sns/userinfo"
)

Variables

View Source
var Info embed.FS

Functions

This section is empty.

Types

type Connector

type Connector struct {
	Config *ConnectorConfig
}

func (*Connector) ConfigFields

func (g *Connector) ConfigFields() []plugin.ConfigField

func (*Connector) ConfigReceiver

func (g *Connector) ConfigReceiver(config []byte) error

func (*Connector) ConnectorLogoSVG

func (g *Connector) ConnectorLogoSVG() string

func (*Connector) ConnectorName

func (g *Connector) ConnectorName() plugin.Translator

func (*Connector) ConnectorReceiver

func (g *Connector) ConnectorReceiver(ctx *plugin.GinContext, receiverURL string) (userInfo plugin.ExternalLoginUserInfo, err error)

func (*Connector) ConnectorSender

func (g *Connector) ConnectorSender(ctx *plugin.GinContext, receiverURL string) (redirectURL string)

func (*Connector) ConnectorSlugName

func (g *Connector) ConnectorSlugName() string

func (*Connector) Info

func (g *Connector) Info() plugin.Info

type ConnectorConfig

type ConnectorConfig struct {
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
}

type TokenResponse

type TokenResponse struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	ExpiresIn    int    `json:"expires_in"`
	OpenID       string `json:"openid"`
	UnionID      string `json:"unionid"`
}

type UserInfoResponse

type UserInfoResponse struct {
	Nickname string `json:"nickname"`
	Avatar   string `json:"headimgurl"`
	OpenID   string `json:"openid"`
	UnionID  string `json:"unionid"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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