Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OAuth2 ¶
type OAuth2 interface { Authorize(code string) OAuthResult // 根据微信返回的accessTokenCode开始鉴权并获取用户信息 // contains filtered or unexported methods }
OAuth2服务的通用鉴权接口
type OAuthUserInfo ¶
type OAuthUserInfo struct { AccessToken string OpenId string UnionId string NickName string Gender int AvatarUrl string }
OAuth授权获取的用户信息
type QQOAuth ¶
type QQOAuth struct {
// contains filtered or unexported fields
}
实现QQOAuth2鉴权
func (*QQOAuth) Authorize ¶
func (oauth *QQOAuth) Authorize(code string) OAuthResult
type WechatOAuth ¶
type WechatOAuth struct {
// contains filtered or unexported fields
}
实现 微信 OAuth2鉴权
var WechatOAuth2Manager WechatOAuth
func (*WechatOAuth) Authorize ¶
func (oauth *WechatOAuth) Authorize(code string) OAuthResult
type WeiboOAuth ¶
type WeiboOAuth struct {
// contains filtered or unexported fields
}
实现微博 OAuth2鉴权
func (*WeiboOAuth) Authorize ¶
func (oauth *WeiboOAuth) Authorize(code string) OAuthResult
Click to show internal directories.
Click to hide internal directories.