Documentation
      ¶
    
    
  
    
  
    Index ¶
- type GetUserDetailRequest
 - type GetUserDetailResponse
 - type GetUserInfoResponse
 - type Oauth
 - func (ctr *Oauth) GetQrContentTargetURL(callbackURL string) string
 - func (ctr *Oauth) GetTargetPrivateURL(callbackURL string, agentID string) string
 - func (ctr *Oauth) GetTargetURL(callbackURL string) string
 - func (ctr *Oauth) GetUserDetail(req *GetUserDetailRequest) (*GetUserDetailResponse, error)
 - func (ctr *Oauth) GetUserInfo(code string) (*GetUserInfoResponse, error)
 - func (ctr *Oauth) UserFromCode(code string) (result ResUserInfo, err error)
 
- type ResUserInfo
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetUserDetailRequest ¶ added in v2.1.6
type GetUserDetailRequest struct {
	UserTicket string `json:"user_ticket"`
}
    GetUserDetailRequest 获取访问用户敏感信息请求
type GetUserDetailResponse ¶ added in v2.1.6
type GetUserDetailResponse struct {
	util.CommonError
	UserID  string `json:"userid"`
	Gender  string `json:"gender"`
	Avatar  string `json:"avatar"`
	QrCode  string `json:"qr_code"`
	Mobile  string `json:"mobile"`
	Email   string `json:"email"`
	BizMail string `json:"biz_mail"`
	Address string `json:"address"`
}
    GetUserDetailResponse 获取访问用户敏感信息响应
type GetUserInfoResponse ¶ added in v2.1.6
type GetUserInfoResponse struct {
	util.CommonError
	UserID         string `json:"userid"`
	UserTicket     string `json:"user_ticket"`
	OpenID         string `json:"openid"`
	ExternalUserID string `json:"external_userid"`
}
    GetUserInfoResponse 获取访问用户身份&获取用户登录身份响应
type Oauth ¶
Oauth auth
func (*Oauth) GetQrContentTargetURL ¶
GetQrContentTargetURL 构造独立窗口登录二维码
func (*Oauth) GetTargetPrivateURL ¶ added in v2.1.4
GetTargetPrivateURL 获取个人信息授权地址
func (*Oauth) GetTargetURL ¶
GetTargetURL 获取授权地址
func (*Oauth) GetUserDetail ¶ added in v2.1.6
func (ctr *Oauth) GetUserDetail(req *GetUserDetailRequest) (*GetUserDetailResponse, error)
GetUserDetail 获取访问用户敏感信息 @see https://developer.work.weixin.qq.com/document/path/95833
func (*Oauth) GetUserInfo ¶ added in v2.1.6
func (ctr *Oauth) GetUserInfo(code string) (*GetUserInfoResponse, error)
GetUserInfo 获取访问用户身份&获取用户登录身份 @see https://developer.work.weixin.qq.com/document/path/90213 获取访问用户身份 @see https://developer.work.weixin.qq.com/document/path/98176 获取用户登录身份
func (*Oauth) UserFromCode ¶
func (ctr *Oauth) UserFromCode(code string) (result ResUserInfo, err error)
UserFromCode 根据code获取用户信息
type ResUserInfo ¶
type ResUserInfo struct {
	util.CommonError
	// 当用户为企业成员时返回
	UserID   string `json:"UserId"`
	DeviceID string `json:"DeviceId"`
	// 非企业成员授权时返回
	OpenID         string `json:"OpenId"`
	ExternalUserID string `json:"external_userid"`
}
    ResUserInfo 返回得用户信息
 Click to show internal directories. 
   Click to hide internal directories.