Documentation ¶
Index ¶
- type AuthQq
- func (a *AuthQq) GetAccessToken(code string) (resp *TokenResult, err error)
- func (a *AuthQq) GetAuthorizeUrl(state string) string
- func (a *AuthQq) GetName() string
- func (a *AuthQq) GetOpenid(accessToken string) (resp *OpenResult, err error)
- func (a *AuthQq) GetUserInfo(accessToken string, openId string) (resp *UserResult, err error)
- func (a *AuthQq) GetUserOpenInfo(code string) (resp *oauth.UserResult, err error)
- func (a *AuthQq) RefreshToken(refreshToken string) (resp *RefreshResult, err error)
- type ErrResult
- type OpenResult
- type RefreshResult
- type TokenResult
- type UserResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthQq ¶
type AuthQq struct { Config *oauth.AuthConfig oauth.AuthOauthURL }
QQ授权登录
func NewAuthQq ¶
func NewAuthQq(conf *oauth.AuthConfig) *AuthQq
func (*AuthQq) GetAccessToken ¶
func (a *AuthQq) GetAccessToken(code string) (resp *TokenResult, err error)
获取token
func (*AuthQq) GetOpenid ¶
func (a *AuthQq) GetOpenid(accessToken string) (resp *OpenResult, err error)
获取用户openid
func (*AuthQq) GetUserInfo ¶
func (a *AuthQq) GetUserInfo(accessToken string, openId string) (resp *UserResult, err error)
func (*AuthQq) GetUserOpenInfo ¶
func (a *AuthQq) GetUserOpenInfo(code string) (resp *oauth.UserResult, err error)
func (*AuthQq) RefreshToken ¶
func (a *AuthQq) RefreshToken(refreshToken string) (resp *RefreshResult, err error)
刷新token
type OpenResult ¶
临时票据结果
type RefreshResult ¶
type TokenResult ¶
type UserResult ¶
type UserResult struct { Ret int `json:"ret" example:"0"` Msg string `json:"msg" example:""` IsLost int `json:"is_lost" example:"0"` Nickname string `json:"nickname" example:"静闻弦语"` FigureURL string `json:"figureurl" example:"http://qzapp.qlogo.cn/qzapp/101993700/0661AA6B4844909CCF75C391A6DDB45A/30"` FigureURL1 string `json:"figureurl_1" example:"http://qzapp.qlogo.cn/qzapp/101993700/0661AA6B4844909CCF75C391A6DDB45A/50"` FigureURL2 string `json:"figureurl_2" example:"http://qzapp.qlogo.cn/qzapp/101993700/0661AA6B4844909CCF75C391A6DDB45A/100"` FigureURLQQ1 string `json:"figureurl_qq_1" example:"http://thirdqq.qlogo.cn/g?b=oidb&k=rgN0sF9KSaOsJhuJp0noZg&kti=ZXLrrAAAAAE&s=40&t=1644466423"` FigureURLQQ2 string `json:"figureurl_qq_2" example:"http://thirdqq.qlogo.cn/g?b=oidb&k=rgN0sF9KSaOsJhuJp0noZg&kti=ZXLrrAAAAAE&s=100&t=1644466423"` FigureURLQQ string `json:"figureurl_qq" example:"http://thirdqq.qlogo.cn/g?b=oidb&k=rgN0sF9KSaOsJhuJp0noZg&kti=ZXLrrAAAAAE&s=640&t=1644466423"` FigureURLType string `json:"figureurl_type" example:"1"` }
Click to show internal directories.
Click to hide internal directories.