mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-29 09:38:19 +08:00
🎨 精简代码,移除无用过期接口代码
This commit is contained in:
@ -163,70 +163,6 @@ public interface WxMpService extends WxService {
|
||||
*/
|
||||
String buildQrConnectUrl(String redirectUri, String scope, String state);
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 构造oauth2授权的url连接.
|
||||
* 详情请见: http://mp.weixin.qq.com/wiki/index.php?title=网页授权获取用户基本信息
|
||||
* </pre>
|
||||
*
|
||||
* @param redirectURI 用户授权完成后的重定向链接,无需urlencode, 方法内会进行encode
|
||||
* @param scope scope
|
||||
* @param state state
|
||||
* @return url string
|
||||
* @deprecated use oauth2Service.buildAuthorizationUrl() instead
|
||||
*/
|
||||
@Deprecated
|
||||
String oauth2buildAuthorizationUrl(String redirectURI, String scope, String state);
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 用code换取oauth2的access token.
|
||||
* 详情请见: http://mp.weixin.qq.com/wiki/index.php?title=网页授权获取用户基本信息
|
||||
* </pre>
|
||||
*
|
||||
* @param code code
|
||||
* @return token对象
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
@Deprecated
|
||||
WxMpOAuth2AccessToken oauth2getAccessToken(String code) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 刷新oauth2的access token.
|
||||
* </pre>
|
||||
*
|
||||
* @param refreshToken 刷新token
|
||||
* @return 新的token对象
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
@Deprecated
|
||||
WxMpOAuth2AccessToken oauth2refreshAccessToken(String refreshToken) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 用oauth2获取用户信息, 当前面引导授权时的scope是snsapi_userinfo的时候才可以.
|
||||
* </pre>
|
||||
*
|
||||
* @param oAuth2AccessToken token对象
|
||||
* @param lang zh_CN, zh_TW, en
|
||||
* @return 用户对象
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
@Deprecated
|
||||
WxMpUser oauth2getUserInfo(WxMpOAuth2AccessToken oAuth2AccessToken, String lang) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 验证oauth2的access token是否有效.
|
||||
* </pre>
|
||||
*
|
||||
* @param oAuth2AccessToken token对象
|
||||
* @return 是否有效
|
||||
*/
|
||||
@Deprecated
|
||||
boolean oauth2validateAccessToken(WxMpOAuth2AccessToken oAuth2AccessToken);
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取微信服务器IP地址
|
||||
|
||||
@ -243,26 +243,6 @@ public abstract class BaseWxMpServiceImpl<H, P> implements WxMpService, RequestH
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMpOAuth2AccessToken oauth2getAccessToken(String code) throws WxErrorException {
|
||||
return this.oAuth2Service.getAccessToken(code);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMpOAuth2AccessToken oauth2refreshAccessToken(String refreshToken) throws WxErrorException {
|
||||
return this.oAuth2Service.refreshAccessToken(refreshToken);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMpUser oauth2getUserInfo(WxMpOAuth2AccessToken token, String lang) throws WxErrorException {
|
||||
return this.oAuth2Service.getUserInfo(token,lang);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean oauth2validateAccessToken(WxMpOAuth2AccessToken token) {
|
||||
return this.oAuth2Service.validateAccessToken(token);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getCallbackIP() throws WxErrorException {
|
||||
String responseContent = this.get(GET_CALLBACK_IP_URL, null);
|
||||
|
||||
Reference in New Issue
Block a user