public class WxCpOAuth2ServiceImpl extends Object implements WxCpOAuth2Service
Created by Binary Wang on 2017-6-25.
| 构造器和说明 |
|---|
WxCpOAuth2ServiceImpl(WxCpService mainService) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
buildAuthorizationUrl(String state)
构造oauth2授权的url连接
|
String |
buildAuthorizationUrl(String redirectUri,
String state)
构造oauth2授权的url连接
详情请见: http://qydev.weixin.qq.com/wiki/index.php?
|
String[] |
getUserInfo(Integer agentId,
String code)
用oauth2获取用户信息
http://qydev.weixin.qq.com/wiki/index.php?
|
String[] |
getUserInfo(String code)
用oauth2获取用户信息
http://qydev.weixin.qq.com/wiki/index.php?
|
public WxCpOAuth2ServiceImpl(WxCpService mainService)
public String buildAuthorizationUrl(String state)
WxCpOAuth2Service构造oauth2授权的url连接
buildAuthorizationUrl 在接口中 WxCpOAuth2Servicestate - 状态码public String buildAuthorizationUrl(String redirectUri, String state)
WxCpOAuth2Service构造oauth2授权的url连接 详情请见: http://qydev.weixin.qq.com/wiki/index.php?title=企业获取code
buildAuthorizationUrl 在接口中 WxCpOAuth2ServiceredirectUri - 跳转链接地址state - 状态码public String[] getUserInfo(String code) throws WxErrorException
WxCpOAuth2Service用oauth2获取用户信息 http://qydev.weixin.qq.com/wiki/index.php?title=根据code获取成员信息 因为企业号oauth2.0必须在应用设置里设置通过ICP备案的可信域名,所以无法测试,因此这个方法很可能是坏的。 注意: 这个方法使用WxCpConfigStorage里的agentId
getUserInfo 在接口中 WxCpOAuth2Servicecode - 微信oauth授权返回的代码WxErrorExceptionWxCpOAuth2Service.getUserInfo(Integer, String)public String[] getUserInfo(Integer agentId, String code) throws WxErrorException
WxCpOAuth2Service用oauth2获取用户信息 http://qydev.weixin.qq.com/wiki/index.php?title=根据code获取成员信息 因为企业号oauth2.0必须在应用设置里设置通过ICP备案的可信域名,所以无法测试,因此这个方法很可能是坏的。 注意: 这个方法不使用WxCpConfigStorage里的agentId,需要开发人员自己给出
getUserInfo 在接口中 WxCpOAuth2ServiceagentId - 企业号应用的idcode - 微信oauth授权返回的代码WxErrorExceptionWxCpOAuth2Service.getUserInfo(String)Copyright © 2017. All rights reserved.