1
0
mirror of synced 2025-12-21 08:30:11 +08:00

refactor: mp 调整access token刷新策略

This commit is contained in:
Daniel Qian
2015-01-20 13:52:40 +08:00
parent cef8ac01e8
commit 1bca854b52
10 changed files with 115 additions and 96 deletions

View File

@@ -42,7 +42,7 @@ public class ApiTestModule implements Module {
@Override
public String toString() {
return "SimpleWxConfigProvider [appId=" + appId + ", secret=" + secret + ", accessToken=" + accessToken
+ ", expiresIn=" + expiresIn + ", token=" + token + ", openId=" + openId + "]";
+ ", expiresTime=" + expiresTime + ", token=" + token + ", openId=" + openId + "]";
}
}

View File

@@ -22,7 +22,7 @@ public class WxMpBaseAPITest {
public void testRefreshAccessToken() throws WxErrorException {
WxMpConfigStorage configStorage = wxService.wxMpConfigStorage;
String before = configStorage.getAccessToken();
wxService.accessTokenRefresh();
wxService.getAccessToken();
String after = configStorage.getAccessToken();

View File

@@ -16,7 +16,7 @@ class WxMpDemoInMemoryConfigStorage extends WxMpInMemoryConfigStorage {
@Override
public String toString() {
return "SimpleWxConfigProvider [appId=" + appId + ", secret=" + secret + ", accessToken=" + accessToken
+ ", expiresIn=" + expiresIn + ", token=" + token + ", aesKey=" + aesKey + "]";
+ ", expiresTime=" + expiresTime + ", token=" + token + ", aesKey=" + aesKey + "]";
}

View File

@@ -4,7 +4,7 @@
<token>公众号Token</token>
<aesKey>公众号EncodingAESKey</aesKey>
<accessToken>可以不填写</accessToken>
<expiresIn>可以不填写</expiresIn>
<expiresTime>可以不填写</expiresTime>
<openId>某个加你公众号的用户的openId</openId>
<oauth2redirectUri>网页授权获取用户信息回调地址</oauth2redirectUri>
</xml>