提交 144decd9 编写于 作者: 不合群的混子's avatar 不合群的混子

🐛 微信公众平台更换为微信开放平台

上级 87c2a1b2
......@@ -336,7 +336,7 @@ public enum ApiUrl {
WECHAT {
@Override
public String authorize() {
return "https://open.weixin.qq.com/connect/oauth2/authorize";
return "https://open.weixin.qq.com/connect/qrconnect";
}
@Override
......
......@@ -56,7 +56,7 @@ public class UrlBuilder {
private static final String QQ_AUTHORIZE_PATTERN = "{0}?client_id={1}&response_type=code&redirect_uri={2}&state={3}";
private static final String QQ_OPENID_PATTERN = "{0}?access_token={1}";
private static final String WECHAT_AUTHORIZE_PATTERN = "{0}?appid={1}&redirect_uri={2}&response_type=code&scope=snsapi_userinfo#wechat_redirect";
private static final String WECHAT_AUTHORIZE_PATTERN = "{0}?appid={1}&redirect_uri={2}&response_type=code&scope=snsapi_login&state={3}#wechat_redirect";
private static final String WECHAT_ACCESS_TOKEN_PATTERN = "{0}?appid={1}&secret={2}&code={3}&grant_type=authorization_code";
private static final String WECHAT_REFRESH_TOKEN_PATTERN = "{0}?appid={1}&grant_type=refresh_token&refresh_token={2}";
private static final String WECHAT_USER_INFO_PATTERN = "{0}?access_token={1}&openid={2}&lang=zh_CN";
......@@ -429,7 +429,7 @@ public class UrlBuilder {
* @return full url
*/
public static String getWeChatAuthorizeUrl(String clientId, String redirectUrl) {
return MessageFormat.format(WECHAT_AUTHORIZE_PATTERN, ApiUrl.WECHAT.authorize(), clientId, redirectUrl);
return MessageFormat.format(WECHAT_AUTHORIZE_PATTERN, ApiUrl.WECHAT.authorize(), clientId, redirectUrl, System.currentTimeMillis());
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册