Update TokenHolder.java
增加手动移除token 的方法。
This commit is contained in:
parent
92a847ecac
commit
8d4e0cfec5
@ -74,6 +74,16 @@ public class TokenHolder {
|
|||||||
tokenStorager.caching(cacheKey, token);
|
tokenStorager.caching(cacheKey, token);
|
||||||
return token;
|
return token;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手动移除token
|
||||||
|
* @return 被移除的token
|
||||||
|
* @throws WeixinException
|
||||||
|
*/
|
||||||
|
public Token evictToken() throws WeixinException {
|
||||||
|
String cacheKey = tokenCreator.getCacheKey();
|
||||||
|
return tokenStorager.evict(cacheKey);
|
||||||
|
}
|
||||||
|
|
||||||
public TokenStorager getTokenStorager() {
|
public TokenStorager getTokenStorager() {
|
||||||
return tokenStorager;
|
return tokenStorager;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user