🆕 【公众号】优化配置类,增加新方法获取 OAuth 2.0重定向 URL 和 QR 连接重定向 URL !146

This commit is contained in:
pengles
2024-12-09 09:01:12 +00:00
committed by Binary Wang
parent 03f78caecf
commit ca005534d4
6 changed files with 48 additions and 4 deletions

View File

@@ -22,13 +22,15 @@ public interface WxMpConfigStorage {
/**
* Is use stable access token api
* @Link https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/getStableAccessToken.html
*
* @return the boolean
* @link https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/getStableAccessToken.html
*/
boolean isStableAccessToken();
/**
* Set use stable access token api
*
* @param useStableAccessToken true is use, false is not
*/
void useStableAccessToken(boolean useStableAccessToken);
@@ -154,9 +156,28 @@ public interface WxMpConfigStorage {
* Gets oauth 2 redirect uri.
*
* @return the oauth 2 redirect uri
* @deprecated This method is deprecated due to incorrect naming convention.
* Use {@link #getOauth2RedirectUrl()} instead.
*/
@Deprecated
String getOauth2redirectUri();
/**
* Gets OAuth 2.0 redirect Url
*
* @return the OAuth 2.0 redirect Url
* @author <a href="https://gitee.com/pengles">Peng Les</a>
*/
String getOauth2RedirectUrl();
/**
* Gets QR connect redirect Url
*
* @return the QR connect redirect Url
* @author <a href="https://gitee.com/pengles">Peng Les</a>
*/
String getQrConnectRedirectUrl();
/**
* Gets http proxy host.
*

View File

@@ -34,7 +34,10 @@ public class WxMpDefaultConfigImpl implements WxMpConfigStorage, Serializable {
protected volatile String aesKey;
protected volatile long expiresTime;
@Deprecated
protected volatile String oauth2redirectUri;
protected volatile String oauth2RedirectUrl;
protected volatile String qrConnectRedirectUrl;
protected volatile String httpProxyHost;
protected volatile int httpProxyPort;