authorizer

package
v0.7.7 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2022 License: Zlib Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type AInfo

type AInfo struct {
	Authorization
	FuncInfo
}

type AccessToken

type AccessToken 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 (AccessToken) GetAccessToken

func (a AccessToken) GetAccessToken() access.Value

access.Token interface implement

func (AccessToken) GetRefAccessToken

func (a AccessToken) GetRefAccessToken() access.Value

type Auth

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

type Authorization

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

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

func (AuthorizationInfo) GetAccessToken

func (a AuthorizationInfo) GetAccessToken() access.Value

access.Token interface implement

func (AuthorizationInfo) GetRefAccessToken

func (a AuthorizationInfo) GetRefAccessToken() access.Value

type FuncInfo

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

type Info

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

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

type ListAuthInfo

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

func GetAuthorizerList

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

type PreAuthCode

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

func GetPerAuthCode

func GetPerAuthCode(api *api.Api) (*PreAuthCode, error)

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

Jump to

Keyboard shortcuts

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