app3

package
v1.8.101 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Zlib Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthorizerGetAccessToken added in v1.8.35

func AuthorizerGetAccessToken(tk token.Token, d data.D) (access.Token, error)

AuthorizerGetAccessToken 使用授权码获取授权信息

https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/api/authorization_info.html

func AuthorizerRefreshToken added in v1.8.35

func AuthorizerRefreshToken(tk token.Token, d data.D) (access.Token, error)

AuthorizerRefreshToken 获取/刷新接口调用令牌

func ClearQuota

func ClearQuota(api *token.Api) error

ClearQuota 所有api调用(包括第三方帮其调用)次数进行清零,每月10次 https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/Official_Accounts/Official_account_interface.html

func GetAuthorizerInfo added in v1.8.35

func GetAuthorizerInfo(api *token.Api, authorizerAppId string) (*Info, *AuthorizationInfo, error)

https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/api/api_get_authorizer_info.html 获取授权方的帐号基本信息

func GetComponentAccessToken

func GetComponentAccessToken(tk token.Token, d data.D) (access.Token, error)

func GetIdService added in v1.0.29

func GetIdService() token.Service

func GetService added in v1.0.29

func GetService() token.Service

func GetWebService added in v1.0.29

func GetWebService() token.Service

func NewIdToken added in v1.0.29

func NewIdToken(app token.App) token.Token

func NewToken

func NewToken(app token.App) token.Token

func NewWebToken added in v1.0.29

func NewWebToken(app token.App) token.Token

func WebGetAccessToken added in v1.8.35

func WebGetAccessToken(tk token.Token, d data.D) (access.Token, error)

WebGetAccessToken https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/Official_Accounts/official_account_website_authorization.html 第三方平台可以根据本文档相关说明,代替授权公众号发起网页授权 ?appid=APPID&code=CODE&grant_type=authorization_code&component_appid=COMPONENT_APPID&

func WebRefreshToken added in v1.8.35

func WebRefreshToken(tk token.Token, d data.D) (access.Token, error)

Types

type AInfo added in v1.8.35

type AInfo struct {
	Authorization
	FuncInfo
}

type AccessToken

type AccessToken struct {
	Token     string `json:"component_access_token"`
	ExpiresIn int64  `json:"expires_in"`
}

func (AccessToken) GetAccessToken

func (a AccessToken) GetAccessToken() access.Value

GetAccessToken access.Token interface implement

func (AccessToken) GetRefAccessToken

func (a AccessToken) GetRefAccessToken() access.Value

type Auth added in v1.8.35

type Auth struct {
	AuthorizerAppId        string `json:"authorizer_appid"`
	AuthorizerRefreshToken string `json:"refresh_token"`
	AuthTime               int64  `json:"auth_time"`
}

type Authorization added in v1.8.35

type Authorization struct {
	Appid        string `json:"authorizer_appid"`
	AccessToken  string `json:"authorizer_access_token"`
	ExpiresIn    int64  `json:"expires_in"`
	RefreshToken string `json:"authorizer_refresh_token"`
}

type AuthorizationInfo added in v1.8.35

type AuthorizationInfo struct {
	Info AInfo `json:"authorization_info"`
}

func (AuthorizationInfo) GetAccessToken added in v1.8.35

func (a AuthorizationInfo) GetAccessToken() access.Value

GetAccessToken access.Token interface implement

func (AuthorizationInfo) GetRefAccessToken added in v1.8.35

func (a AuthorizationInfo) GetRefAccessToken() access.Value

type AuthorizerToken added in v1.8.35

type AuthorizerToken struct {
	AuthorizerAppId string `json:"authorizer_appid,omitempty"`
	AcsToken        string `json:"authorizer_access_token"`
	ExpireIn        int64  `json:"expires_in"`
	RefToken        string `json:"authorizer_refresh_token"`
	RefExpireIn     int64  `json:"authorizer_refresh_expires_in,omitempty"`
}

func (AuthorizerToken) GetAccessToken added in v1.8.35

func (a AuthorizerToken) GetAccessToken() access.Value

GetAccessToken access.Token interface implement

func (AuthorizerToken) GetRefAccessToken added in v1.8.35

func (a AuthorizerToken) GetRefAccessToken() access.Value

type FuncInfo added in v1.8.35

type FuncInfo struct {
	Func []interface{} `json:"func_info"`
}

type Info added in v1.8.35

type Info struct {
	Info map[string]interface{} `json:"authorizer_info"`
}

Info 获取授权方的帐号基本信息

type ListAuthInfo added in v1.8.35

type ListAuthInfo struct {
	TotalCount int    `json:"total_count"`
	List       []Auth `json:"list"`
}

func GetAuthorizerList added in v1.8.35

func GetAuthorizerList(api *token.Api, offset, count int) (*ListAuthInfo, error)

type PreAuthCode added in v1.8.35

type PreAuthCode struct {
	Code      string `json:"pre_auth_code"`
	ExpiresIn int64  `json:"expires_in"`
}

func GetPreAuthCode added in v1.8.35

func GetPreAuthCode(api *token.Api) (*PreAuthCode, error)

GetPreAuthCode 预授权码(pre_auth_code)是第三方平台方实现授权托管的必备信息,每个预授权码有效期为 10 分钟。需要先获取令牌才能调用。

Jump to

Keyboard shortcuts

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