Skip to content

Commit

Permalink
Merge pull request silenceper#104 from ckeyer/add_unionid
Browse files Browse the repository at this point in the history
网页授权返回,添加`unionid`
  • Loading branch information
silenceper authored Apr 23, 2019
2 parents 6e1ec1f + 4434353 commit 0871e2f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions oauth/oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ type ResAccessToken struct {
RefreshToken string `json:"refresh_token"`
OpenID string `json:"openid"`
Scope string `json:"scope"`

// UnionID 只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段。
// 公众号文档 https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140842
UnionID string `json:"unionid"`
}

// GetUserAccessToken 通过网页授权的code 换取access_token(区别于context中的access_token)
Expand Down

0 comments on commit 0871e2f

Please sign in to comment.