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