mirror of
https://gitee.com/yadong.zhang/JustAuth.git
synced 2025-12-08 01:38:24 +08:00
🐛 微信公众平台更换为微信开放平台
This commit is contained in:
parent
87c2a1b2cd
commit
144decd932
@ -336,7 +336,7 @@ public enum ApiUrl {
|
|||||||
WECHAT {
|
WECHAT {
|
||||||
@Override
|
@Override
|
||||||
public String authorize() {
|
public String authorize() {
|
||||||
return "https://open.weixin.qq.com/connect/oauth2/authorize";
|
return "https://open.weixin.qq.com/connect/qrconnect";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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_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 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_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_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";
|
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
|
* @return full url
|
||||||
*/
|
*/
|
||||||
public static String getWeChatAuthorizeUrl(String clientId, String redirectUrl) {
|
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());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user