Browse Source

。。。。

WANG 5 years ago
parent
commit
821b0d526b
1 changed files with 22 additions and 0 deletions
  1. 22 0
      src/main/java/cn/com/qmth/examcloud/web/baidu/BaiduClient.java

+ 22 - 0
src/main/java/cn/com/qmth/examcloud/web/baidu/BaiduClient.java

@@ -161,6 +161,10 @@ public class BaiduClient {
 	 */
 	public JsonHttpResponseHolder verifyFaceLiveness(String imageUrl) {
 
+		if (log.isDebugEnabled()) {
+			log.debug("[Baidu AI]. verifyFaceLiveness(String); imageUrl=" + imageUrl);
+		}
+
 		String accessToken = getAccessToken();
 		String url = "https://aip.baidubce.com/rest/2.0/face/v3/faceverify?access_token="
 				+ accessToken;
@@ -265,9 +269,27 @@ public class BaiduClient {
 		return responseHolder;
 	}
 
+	/**
+	 * 百度活体检测<br>
+	 * 优先使用主地址调用baidu活体检测接口<br>
+	 * 主地址无效时,使用备用地址调用baidu活体检测接口<br>
+	 * 备用地址也无效时,使用备用地址下载数据,使用下载数据的base64加密串调用baidu活体检测接口<br>
+	 * 
+	 *
+	 * @author WANGWEI
+	 * @param imageUrl
+	 * @param backupImageUrl
+	 * @return
+	 * @throws StatusException
+	 */
 	public JsonHttpResponseHolder verifyFaceLiveness(String imageUrl, String backupImageUrl)
 			throws StatusException {
 
+		if (log.isDebugEnabled()) {
+			log.debug("[Face++]. verifyFaceLiveness(String,String); imageUrl=" + imageUrl
+					+ "; backupImageUrl=" + backupImageUrl);
+		}
+
 		JsonHttpResponseHolder responseHolder = verifyFaceLiveness(imageUrl);
 
 		JSONObject respBody = responseHolder.getRespBody();