Documentation
¶
Index ¶
- type GetTfaInfoRequest
- type GetTfaInfoResponse
- 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) GetTfaInfo(req *GetTfaInfoRequest) (*GetTfaInfoResponse, error)
- func (ctr *Oauth) GetUserDetail(req *GetUserDetailRequest) (*GetUserDetailResponse, error)
- func (ctr *Oauth) GetUserInfo(code string) (*GetUserInfoResponse, error)
- func (ctr *Oauth) TfaSucc(req *TfaSuccRequest) error
- func (ctr *Oauth) UserFromCode(code string) (result ResUserInfo, err error)
- type ResUserInfo
- type TfaSuccRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetTfaInfoRequest ¶ added in v2.1.12
type GetTfaInfoRequest struct {
Code string `json:"code"`
}
GetTfaInfoRequest 获取用户二次验证信息请求
type GetTfaInfoResponse ¶ added in v2.1.12
type GetTfaInfoResponse struct {
util.CommonError
UserID string `json:"userid"`
TfaCode string `json:"tfa_code"`
}
GetTfaInfoResponse 获取用户二次验证信息响应
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) GetTfaInfo ¶ added in v2.1.12
func (ctr *Oauth) GetTfaInfo(req *GetTfaInfoRequest) (*GetTfaInfoResponse, error)
GetTfaInfo 获取用户二次验证信息 @see https://developer.work.weixin.qq.com/document/path/99499
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) TfaSucc ¶ added in v2.1.12
func (ctr *Oauth) TfaSucc(req *TfaSuccRequest) error
TfaSucc 使用二次验证 @see https://developer.work.weixin.qq.com/document/path/99500
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 返回得用户信息
type TfaSuccRequest ¶ added in v2.1.12
TfaSuccRequest 使用二次验证请求