wechat

package
v0.3.11-8 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	AccessTokenUrl = "https://api.weixin.qq.com/sns/oauth2/access_token"
	UserInfoUrl    = "https://api.weixin.qq.com/sns/userinfo"
)
View Source
const (
	AuthUrl = "https://open.weixin.qq.com/connect/qrconnect"
)

Variables

This section is empty.

Functions

func NewWechatOAuth2Driver

func NewWechatOAuth2Driver(appId string, secret string) oauth2.IOAuth2Driver

Types

type SWechatDriverFactory

type SWechatDriverFactory struct{}

func (SWechatDriverFactory) IdpAttributeOptions

func (drv SWechatDriverFactory) IdpAttributeOptions() api.SIdpAttributeOptions

func (SWechatDriverFactory) NewDriver

func (drv SWechatDriverFactory) NewDriver(appId string, secret string) oauth2.IOAuth2Driver

func (SWechatDriverFactory) TemplateName

func (drv SWechatDriverFactory) TemplateName() string

func (SWechatDriverFactory) ValidateConfig

func (drv SWechatDriverFactory) ValidateConfig(conf api.SOAuth2IdpConfigOptions) error

type SWechatOAuth2Driver

type SWechatOAuth2Driver struct {
	oauth2.SOAuth2BaseDriver
}

func (*SWechatOAuth2Driver) Authenticate

func (drv *SWechatOAuth2Driver) Authenticate(ctx context.Context, code string) (map[string][]string, error)

func (*SWechatOAuth2Driver) GetSsoRedirectUri

func (drv *SWechatOAuth2Driver) GetSsoRedirectUri(ctx context.Context, callbackUrl, state string) (string, error)

Jump to

Keyboard shortcuts

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