Documentation
¶
Index ¶
- func GetAPIDomainIP(result *ResultIP) wx.Action
- func GetCallbackIP(result *ResultIP) wx.Action
- func GetOAuthUser(code string, result *ResultOAuthUser) wx.Action
- func GetOAuthUserDetail(userTicket string, result *ResultOAuthUserDetail) wx.Action
- func UserAuthSucc(userID string) wx.Action
- type AccessToken
- type AuthScope
- type Corp
- func (corp *Corp) AccessToken(ctx context.Context, secret string, options ...wx.HTTPOption) (*AccessToken, error)
- func (corp *Corp) CorpID() string
- func (corp *Corp) DecryptEventMessage(encrypt string) (wx.WXML, error)
- func (corp *Corp) Do(ctx context.Context, accessToken string, action wx.Action, ...) error
- func (corp *Corp) OAuth2URL(scope AuthScope, redirectURL, state, agentID string) string
- func (corp *Corp) QRCodeAuthURL(agentID, redirectURL, state string) string
- func (corp *Corp) VerifyEventSign(signature string, items ...string) bool
- type Option
- type ParamsOAuthUserDetail
- type ResultIP
- type ResultOAuthUser
- type ResultOAuthUserDetail
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAPIDomainIP ¶
func GetCallbackIP ¶
func GetOAuthUser ¶
func GetOAuthUser(code string, result *ResultOAuthUser) wx.Action
GetOAuthUser 获取访问用户身份
func GetOAuthUserDetail ¶ added in v1.3.6
func GetOAuthUserDetail(userTicket string, result *ResultOAuthUserDetail) wx.Action
GetOAuthUserDetail 获取访问用户敏感信息,需要在后台通讯录配置开启
Types ¶
type AccessToken ¶
AccessToken 企业微信AccessToken
type Corp ¶
type Corp struct {
// contains filtered or unexported fields
}
func (*Corp) AccessToken ¶
func (corp *Corp) AccessToken(ctx context.Context, secret string, options ...wx.HTTPOption) (*AccessToken, error)
func (*Corp) DecryptEventMessage ¶
DecryptEventMessage 事件消息解密
func (*Corp) Do ¶
func (corp *Corp) Do(ctx context.Context, accessToken string, action wx.Action, options ...wx.HTTPOption) error
Do exec action
func (*Corp) OAuth2URL ¶
OAuth2URL 生成网页授权URL(请使用 URLEncode 对 redirectURL 进行处理) [参考](https://open.work.weixin.qq.com/api/doc/90000/90135/91020)
func (*Corp) QRCodeAuthURL ¶
QRCodeAuthURL 生成扫码授权URL(请使用 URLEncode 对 redirectURL 进行处理) [参考](https://open.work.weixin.qq.com/api/doc/90000/90135/90988)
func (*Corp) VerifyEventSign ¶
VerifyEventSign 验证事件消息签名 验证消息来自微信服务器,使用:msg_signature、timestamp、nonce、echostr(若验证成功,解密echostr后返回msg字段内容) 验证事件消息签名,使用:msg_signature、timestamp、nonce、msg_encrypt [参考](https://developer.work.weixin.qq.com/document/path/90930)
type Option ¶
type Option func(corp *Corp)
Option 企微配置项
func WithServerConfig ¶
WithServerConfig 设置服务器配置 [参考](https://open.work.weixin.qq.com/api/doc/90000/90135/90930)
type ParamsOAuthUserDetail ¶ added in v1.3.7
type ParamsOAuthUserDetail struct {
UserTicket string `json:"user_ticket"`
}
ParamsOAuthUserDetail 获取访问用户敏感信息参数
type ResultOAuthUser ¶
type ResultOAuthUserDetail ¶
type ResultOAuthUserDetail struct { UserId string `json:"userid"` Mobile string `json:"mobile"` Gender string `json:"gender"` Email string `json:"email"` Avatar string `json:"avatar"` QrCode string `json:"qr_code"` BizMail string `json:"biz_mail"` Address string `json:"address"` }
OAuthUserDetail 访问用户敏感信息