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