二次验证支持

This commit is contained in:
Daniel Qian 2014-10-21 18:40:28 +08:00
parent 471b4a7a51
commit 40430a7874
2 changed files with 14 additions and 1 deletions

View File

@ -28,7 +28,16 @@ public interface WxCpService {
* @return
*/
public boolean checkSignature(String msgSignature, String timestamp, String nonce, String data);
/**
* <pre>
* 用在二次验证的时候
* 企业在员工验证成功后调用本方法告诉企业号平台该员工关注成功
* </pre>
* @param userId
*/
public void userAuthenticated(String userId) throws WxErrorException;
/**
* <pre>
* 获取access_token本方法线程安全

View File

@ -60,6 +60,10 @@ public class WxCpServiceImpl implements WxCpService {
}
}
public void userAuthenticated(String userId) throws WxErrorException {
String url = "https://qyapi.weixin.qq.com/cgi-bin/user/authsucc?userid=" + userId;
execute(new SimpleGetRequestExecutor(), url, null);
}
public void accessTokenRefresh() throws WxErrorException {
if (!GLOBAL_ACCESS_TOKEN_REFRESH_FLAG.getAndSet(true)) {