Documentation
¶
Index ¶
- type ConnectPlatform
- func (c *ConnectPlatform) GetAccessToken(code string, redirectURI string) (*getAccessTokenResp, error)
- func (c *ConnectPlatform) GetAuthURL(redirectURI string, state string) (string, error)
- func (c *ConnectPlatform) GetUnionID(accessToken string) (*getUnionIDResp, error)
- func (c *ConnectPlatform) GetUserInfo(accessToken, openID string) (*getUserInfoResp, error)
- type ConnectPlatformConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectPlatform ¶
type ConnectPlatform struct {
// contains filtered or unexported fields
}
Docs: https://wiki.connect.qq.com/%E4%BD%BF%E7%94%A8authorization_code%E8%8E%B7%E5%8F%96access_token https://wiki.connect.qq.com/%E5%85%AC%E5%85%B1%E8%BF%94%E5%9B%9E%E7%A0%81%E8%AF%B4%E6%98%8E
func NewConnectPlatform ¶
func NewConnectPlatform(c ConnectPlatformConfig) *ConnectPlatform
func (*ConnectPlatform) GetAccessToken ¶
func (c *ConnectPlatform) GetAccessToken(code string, redirectURI string) (*getAccessTokenResp, error)
GetAccessToken get access token through code.
func (*ConnectPlatform) GetAuthURL ¶
func (c *ConnectPlatform) GetAuthURL(redirectURI string, state string) (string, error)
GetAuthURL get auth URL. After the user allows authorization, they will be redirected to the redirect_uri URL with code and state parameters.
func (*ConnectPlatform) GetUnionID ¶
func (c *ConnectPlatform) GetUnionID(accessToken string) (*getUnionIDResp, error)
GetUnionID get unionid through access_token.
func (*ConnectPlatform) GetUserInfo ¶
func (c *ConnectPlatform) GetUserInfo(accessToken, openID string) (*getUserInfoResp, error)
GetUserInfo get user info through access_token and openid.
type ConnectPlatformConfig ¶
Click to show internal directories.
Click to hide internal directories.