这注意的是每个流程中订单号等信息一定要完全一样。
https://cloud.tencent.com/document/product/655/32101 接口流程文档
查询身份认证结果 接口文档
https://cloud.tencent.com/document/product/655/32052
对应的controller
package com.xiaocaimi.crawl.web.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.beust.jcommander.internal.Lists;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.xiaocaimi.crawl.common.enumeration.ErrorCodeEnum;
import com.xiaocaimi.crawl.common.util.HttpUtil;
import com.xiaocaimi.crawl.pojo.entity.User;
import com.xiaocaimi.crawl.pojo.vo.EasyfaceVo;
import com.xiaocaimi.crawl.pojo.vo.Geth5faceidVo;
import com.xiaocaimi.crawl.pojo.vo.LoginVo;
import com.xiaocaimi.crawl.pojo.vo.SyncVo;
import com.xiaocaimi.crawl.service.impl.FaceVerificationImpl;
import com.xiaocaimi.crawl.service.impl.UserServiceImpl;
import com.xiaocaimi.framework.common.annotation.RequestBodyWithValid;
import com.xiaocaimi.framework.common.base.BaseResult;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.http.Consts;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.omg.CORBA.NameValuePair;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RequestMapping("/v1/user/")
@Slf4j
@Controller
public class UserController {
@Autowired
private UserServiceImpl userServiceImpl;
@Autowired
private FaceVerificationImpl faceVerificationImpl;
private static ObjectMapper objectMapper = new ObjectMapper();
@ApiOperation(value = "更新用户的身份证和验证信息")
@PostMapping(path = "/updateUser")
public @ResponseBody
BaseResult updateUser(@RequestBodyWithValid User user) {
userServiceImpl.updateUser(user);
return new BaseResult(ErrorCodeEnum.SUCCESS);
}
@ApiOperation(value = "查询用户的信息")
@PostMapping(path = "/selectUser")
public @ResponseBody
BaseResult selectUser(@RequestBodyWithValid User user) {
return new BaseResult(userServiceImpl.selectUser(user));
}
@ApiOperation(value = "easyface获取人脸识别签名方法", notes = "获取人脸识别签名方法")
@ApiImplicitParams({
@ApiImplicitParam(name = "idCardNo", value = "身份证号码", required = true, dataType = "String", paramType = "query"),
@ApiImplicitParam(name = "name", value = "姓名", required = true, dataType = "String", paramType = "query")
})
@GetMapping(path = "/getFaceVerificationSign")
public @ResponseBody BaseResult getFaceVerificationSign(@RequestParam("idCardNo")String idCardNo, @RequestParam("name")String name) {
Map map = faceVerificationImpl.getFaceVerificationSignMap(idCardNo, name);
return new BaseResult(map);
}
@ApiOperation(value = "easyface自拍照+身份信息模式", notes = "自拍照+身份信息模式")
@PostMapping(path = "/easyface")
public @ResponseBody BaseResult easyface(@RequestBodyWithValid EasyfaceVo easyfaceVo) throws Exception {
log.info("easyface 入参 {}", easyfaceVo.toString());
String url = "https://ida.webank.com/api/paas/easyface";
JSONObject itemJSONObj = JSONObject.parseObject(JSON.toJSONString(easyfaceVo));
String resp = HttpUtil.doPost(url, itemJSONObj);
JSONObject jsonObject = JSON.parseObject(resp);
return new BaseResult(jsonObject);
}
@ApiOperation(value = "H5获取人脸识别签名方法", notes = "H5获取人脸识别签名方法")
@ApiImplicitParams({
@ApiImplicitParam(name = "idCardNo", value = "身份证号码", required = true, dataType = "String", paramType = "query"),
@ApiImplicitParam(name = "name", value = "姓名", required = true, dataType = "String", paramType = "query")
})
@GetMapping(path = "/getH5FaceVerificationSign")
public @ResponseBody BaseResult getH5FaceVerificationSign(@RequestParam("name")String name, @RequestParam("idCardNo")String idCardNo) {
Map map = faceVerificationImpl.getH5FaceVerificationSignMap(name, idCardNo);
return new BaseResult(map);
}
@ApiOperation(value = "合作方后台上送身份信息", notes = "合作方后台上送身份信息")
@PostMapping(path = "/geth5faceid")
public @ResponseBody BaseResult geth5faceid(@RequestBodyWithValid Geth5faceidVo geth5faceidVo) throws Exception {
log.info("geth5faceid 入参 {}", geth5faceidVo.toString());
String url = "https://idasc.webank.com/api/server/h5/geth5faceid";
JSONObject itemJSONObj = JSONObject.parseObject(JSON.toJSONString(geth5faceidVo));
log.info("{}", itemJSONObj.toString());
String resp = HttpUtil.doPost(url, itemJSONObj);
JSONObject jsonObject = JSON.parseObject(resp);
return new BaseResult(jsonObject);
}
@ApiOperation(value = "启动 H5 人脸核身", notes = "启动 H5 人脸核身")
@GetMapping(path = "/getH5FaceVerificationLoginSign")
public @ResponseBody BaseResult getH5FaceVerificationLoginSign(String h5faceId, String url, String resultType, String orderNo) {
//resultType = null;
log.info("orderNo {}", orderNo);
Map map = faceVerificationImpl.getFaceVerificationNonce(h5faceId, url, resultType, orderNo);
return new BaseResult(map);
}
@ApiOperation(value = "合作方后台上送身份信息", notes = "合作方后台上送身份信息")
@GetMapping(path = "/login")
public @ResponseBody BaseResult login(LoginVo loginVo, HttpServletResponse resp) throws Exception {
log.info("login 入参 {}", loginVo.toString());
List<BasicNameValuePair> params = Lists.newArrayList();
params.add(new BasicNameValuePair("webankAppId",loginVo.getWebankAppId()));
params.add(new BasicNameValuePair("version", loginVo.getVersion()));
params.add(new BasicNameValuePair("nonce", loginVo.getNonce()));
params.add(new BasicNameValuePair("orderNo", loginVo.getOrderNo()));
params.add(new BasicNameValuePair("h5faceId", loginVo.getH5faceId()));
params.add(new BasicNameValuePair("url", loginVo.getUrl()));
params.add(new BasicNameValuePair("resultType",loginVo.getResultType()));
params.add(new BasicNameValuePair("userId", loginVo.getUserId()));
params.add(new BasicNameValuePair("sign", loginVo.getSign()));
params.add(new BasicNameValuePair("from", loginVo.getFrom()));
//转换为键值对
String str = "";
str = EntityUtils.toString(new UrlEncodedFormEntity(params, Consts.UTF_8));
System.out.println(str);
//创建并调用Get请求
final String Url="https://ida.webank.com/api/web/login"+"?"+str;
System.out.println(Url);
return new BaseResult(Url);
}
@ApiOperation(value = "身份认证查询接口", notes = "身份认证查询接口")
@GetMapping(path = "/sync")
public @ResponseBody BaseResult sync(SyncVo syncVo) throws Exception {
String sign = faceVerificationImpl.getH5FaceVerificationNonceResultSign(syncVo.getOrderNo(), syncVo.getNonce());
log.info("login 入参 {}", syncVo.toString());
List<BasicNameValuePair> params = Lists.newArrayList();
params.add(new BasicNameValuePair("app_id",syncVo.getWebankAppId()));
params.add(new BasicNameValuePair("version", syncVo.getVersion()));
params.add(new BasicNameValuePair("nonce", syncVo.getNonce()));
params.add(new BasicNameValuePair("order_no", syncVo.getOrderNo()));
params.add(new BasicNameValuePair("sign", sign));
//转换为键值对
String str = "";
str = EntityUtils.toString(new UrlEncodedFormEntity(params, Consts.UTF_8));
System.out.println(str);
String url = "https://idasc.webank.com/api/server/sync"+"?" + str;
String resp = HttpUtil.get(url);
JSONObject jsonObject = JSON.parseObject(resp);
return new BaseResult(jsonObject);
}
}
//对应的service
package com.xiaocaimi.crawl.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.google.common.base.Charsets;
import com.google.common.hash.Hashing;
import com.xiaocaimi.crawl.cache.RedisCache;
import com.xiaocaimi.crawl.common.util.HttpUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
@Service
@Slf4j
public class FaceVerificationImpl {
private static final String appId="TIDAU80t";
private static final String appSecret="q8tybGNTqoupN5qhwi7IXnHZo7ujJJ6eCqxijWp0r3Nf8epV8ZLmOHKaTfGxeE5H";
private static final String version ="1.0.0";
@Autowired
RedisCache redisCache;
public String getRequestFaceAccessToken(){
String access_token = redisCache.getCache("face_access_token", String.class);
if(access_token != null && !"".equals(access_token)){
return access_token;
}
return getFaceAccessToken();
}
/**
* 获取token
* @return
*/
public String getFaceAccessToken(){
StringBuffer url = new StringBuffer("https://idasc.webank.com/api/oauth2/access_token");
url.append("?app_id=").append(appId);
url.append("&secret=").append(appSecret);
url.append("&grant_type=").append("client_credential");
url.append("&version=").append(version);
String returnData = HttpUtil.get(url.toString()) ;
log.info("getFaceAccessToken获取accessToken信息::{}",returnData);
if(!StringUtils.isEmpty(returnData)){
JSONObject jsonObject = JSON.parseObject(returnData);
Map<String, Object> map = JSONObject.toJavaObject(jsonObject, Map.class);
String accessToken = map.get("access_token") != null ? map.get("access_token").toString() : null;
redisCache.putCacheWithExpireTime("face_access_token", accessToken, 60*20);
return accessToken;
}
return null;
}
/**
* 获取NonceTicket
* @param userId
* @return
*/
private String getFaceNonceTicket(String userId){
//String accessToken = getFaceAccessToken();
String accessToken = getRequestFaceAccessToken();
StringBuffer url = new StringBuffer("https://idasc.webank.com/api/oauth2/api_ticket");
url.append("?app_id=").append(appId);
url.append("&access_token=").append(accessToken);
url.append("&type=").append("NONCE");
url.append("&version=").append(version);
url.append("&user_id=").append(userId);
String returnData = HttpUtil.get(url.toString());
log.info("getFaceNonceTicket获取NonceTicket信息::{}",returnData);
if(returnData != null && !"".equals(returnData)){
JSONObject jsonObject = JSON.parseObject(returnData);
Map<String, Object> map = JSONObject.toJavaObject(jsonObject, Map.class);
log.info("getFaceNonceTicket获取NonceTicket信息::{}",map);
String tickets = map.get("tickets") != null ? map.get("tickets").toString() : null;
if(tickets != null){
JSONArray jsonObjectT = JSON.parseArray(tickets);
List< Map<String,Object>> listw = new ArrayList<Map<String,Object>>();
for (Object object : jsonObjectT) {
Map<String,Object> ageMap = new HashMap<String,Object>();
Map <String,Object> ret = (Map<String, Object>) object;//取出list里面的值转为map
listw.add(ret);
}
String tickt =listw.get(0).get("value").toString();
return tickt;
}
}
return null;
}
/**
* 启动 H5 login人脸核身 生成签名
* @param h5faceId
* @return
*/
public Map getFaceVerificationNonce(String h5faceId, String url, String resultType, String orderNo){
String userId =getZhiDingRandomNumStr(32,"orderNo");//32位随机码
String ticket = getFaceNonceTicket(userId);
List<String> stringList = new ArrayList<>();
stringList.add(appId);
//String orderNo =getZhiDingRandomNumStr(32,"orderNo");//32位随机码
stringList.add(orderNo);//orderNo 订单号,本次人脸核身合作伙伴上送的订单号,唯一标识 合作方自行分配
stringList.add(userId);//userId 用户ID,用户的唯一标识(不要带有特殊字符)
stringList.add(version);//版本号version
stringList.add(h5faceId);//h5/geth5faceid 接口返回的唯一标识
String nonce =getZhiDingRandomNumStr(32,"NONCE");//32位随机码
stringList.add(nonce);
Map map = new HashMap();
String sign = signAlgorithm(stringList,ticket);
map.put("webankAppId",appId);
map.put("version",version);
map.put("nonce",nonce);
map.put("orderNo",orderNo);
map.put("h5faceId",h5faceId);
map.put("url",url);//H5 人脸核身完成后回调的第三方 URL,需要第三方提供完整 URL 且做 URL Encode
map.put("resultType",resultType); //是否显示结果页面 参数值为“1”:直接跳转到 url 回调地址 null 或其他值:跳转提供的结果页面
map.put("userId",userId);
map.put("sign",sign);
map.put("from","browser");
log.info("map {}", map.toString());
return map;
}
/**
* H5 服务端验证结果
*
*/
public String getH5FaceVerificationNonceResultSign(String orderNo, String nonceStr){
String userId =getZhiDingRandomNumStr(32,"orderNo");//32位随机码
String ticket = getFaceSignTicket();
List<String> stringList = new ArrayList<>();
stringList.add(appId);
stringList.add(orderNo);//orderNo 订单号,本次人脸核身合作伙伴上送的订单号,唯一标识 合作方自行分配
stringList.add(version);//版本号version
stringList.add(nonceStr);
String sign = signAlgorithm(stringList,ticket);
log.info("sign {}", sign);
return sign;
}
/**
* 签名算法
* @param values
* @param ticket
* @return
*/
private static String signAlgorithm(List<String> values, String ticket) {
if (values == null) {
throw new NullPointerException("values is null");
}
values.removeAll(Collections.singleton(null));// remove null
values.add(ticket);
Collections.sort(values);
StringBuilder sb = new StringBuilder();
for (String s : values) {
sb.append(s);
}
return Hashing.sha1().hashString(sb, Charsets.UTF_8).toString().toUpperCase();
}
/**
* 获取SIGN ticket
* @return
*/
public String getFaceSignTicket(){
String tickt = redisCache.getCache("face_sign_tickt", String.class);
//String tickt = null;
if(tickt != null && !"".equals(tickt)){
return tickt;
}
String accessToken = getRequestFaceAccessToken();
StringBuffer url = new StringBuffer("https://idasc.webank.com/api/oauth2/api_ticket");
url.append("?app_id=").append(appId);
url.append("&access_token=").append(accessToken);
url.append("&type=").append("SIGN");
url.append("&version=").append(version);
String returnData = HttpUtil.get(url.toString());
log.info("getFaceNonceTicket获取NonceTicket信息::{}",returnData);
if(returnData != null && !"".equals(returnData)){
JSONObject jsonObject = JSON.parseObject(returnData);
Map<String, Object> map = JSONObject.toJavaObject(jsonObject, Map.class);
log.info("getFaceSignTicket获取NonceTicket信息::{}",map);
String tickets = map.get("tickets") != null ? map.get("tickets").toString() : null;
if(tickets != null){
JSONArray jsonObjectT = JSON.parseArray(tickets);
List<Map<String,Object>> listw = new ArrayList<Map<String,Object>>();
for (Object object : jsonObjectT) {
Map <String,Object> ret = (Map<String, Object>) object;//取出list里面的值转为map
listw.add(ret);
}
tickt =listw.get(0).get("value").toString();// map1.get("value") != null ? map1.get("value").toString() : null;
redisCache.putCacheWithExpireTime("face_sign_tickt", tickt, 60*20);
return tickt;
}
}
return null;
}
/*
* easyface提供前端调用身份验证接口的参数
* */
public Map getFaceVerificationSignMap(String idCardNo, String name) {
Map map = getFaceVerificationSign(idCardNo);
Map returnMap = new HashMap();
returnMap.putAll(map);
returnMap.put("webankAppId", appId);
//String nonce =getZhiDingRandomNumStr(32,"NONCE");//32位随机码
//returnMap.put("nonce", nonce);
returnMap.put("version", version);
returnMap.put("orderNo", idCardNo);
returnMap.put("name", name);
returnMap.put("idNo", idCardNo);
returnMap.put("userId", idCardNo);
return returnMap;
}
/*
* 生成签名 SIGN 类型
*
* */
public Map getFaceVerificationSign(String userId){
String ticket = getFaceSignTicket();
log.info("ticket {}", ticket);
List<String> stringList = new ArrayList<>();
stringList.add(appId);
stringList.add(userId);//orderNo订单号,本次人脸核身合作伙伴上送的订单号,唯一标识
String nonceStr =getZhiDingRandomNumStr(32,"NONCE");//32位随机码
stringList.add(nonceStr);//nonce 随机数32位随机串(字母+数字组成的随机数)
stringList.add(version);//版本号version
Map map = new HashMap();
String sign = signAlgorithm(stringList,ticket);
map.put("sign",sign);
log.info("nonceStrLength={}",nonceStr.length());
map.put("nonce",nonceStr);
return map;
}
/*
* H5人脸核身提供前端调用身份验证接口的参数
* */
public Map getH5FaceVerificationSignMap(String name, String idNo){
String ticket = getFaceSignTicket();
log.info("ticket {}", ticket);
List<String> stringList = new ArrayList<>();
stringList.add(appId);
String orderNo =getZhiDingRandomNumStr(32,"orderNo");//32位随机码
stringList.add(orderNo);//orderNo订单号,本次人脸核身合作伙伴上送的订单号,唯一标识
stringList.add(name);//姓名
stringList.add(idNo);//身份证号
String userId =getZhiDingRandomNumStr(32,"userId");//32位随机码
stringList.add(userId);//用户 ID,用户的唯一标识(不要带有特殊字符)
stringList.add(version);//版本号version
Map map = new HashMap();
String sign = signAlgorithm(stringList,ticket);
map.put("sign", sign);
map.put("webankAppId", appId);
map.put("orderNo", orderNo);
map.put("name", name);
map.put("idNo", idNo);
map.put("userId", userId);
map.put("version", version);
log.info("map {}", map.toString());
return map;
}
/**
* 获取身份证查询签名 SIGN ticket 获取
* @return
*/
public Map getSearchFaceVerificationSign(String orderNo,String nonceStr){
String ticket = getFaceSignTicket();
List<String> stringList = new ArrayList<>();
stringList.add(version);//版本号version
stringList.add(appId);
stringList.add(nonceStr);
stringList.add(orderNo);//订单号
Map map = new HashMap();
String sign = signAlgorithm(stringList,ticket);
map.put("sign",sign);
map.put("nonce",nonceStr);
return map;
}
public static String getRandomNumStr(int length) {
String base = "ABCDEFGHIJKMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
Random random = new Random();
StringBuffer sb = new StringBuffer();
for ( int i = 0; i < length; i++ ){
int number = random.nextInt( base.length() );
sb.append( base.charAt( number ) );
}
return sb.toString();
}
public String getZhiDingRandomNumStr(Integer randomNumLength,String type){
String rNum = String.valueOf(System.currentTimeMillis());
Integer typeLength = type.length();
int i = randomNumLength - rNum.length()-typeLength;
String nonceStr = type+rNum+getRandomNumStr(i);//32位随机码
return nonceStr;
}
}
http请求工具类
package com.xiaocaimi.crawl.common.util;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import java.io.IOException;
import java.nio.charset.Charset;
@Slf4j
public class HttpUtil {
public static String get(String url) {
String body = null;
try (CloseableHttpClient httpClient = HttpClientBuilder.create().build()) {
log.info("create httppost:" + url);
HttpGet get = new HttpGet(url);
get.addHeader("Accept-Charset","utf-8");
HttpResponse response = sendRequest(httpClient, get);
body = parseResponse(response);
} catch (IOException e) {
log.error("send post request failed: {}", e.getMessage());
}
return body;
}
private static HttpResponse sendRequest(CloseableHttpClient httpclient, HttpUriRequest httpost)
throws ClientProtocolException, IOException {
HttpResponse response = null;
response = httpclient.execute(httpost);
return response;
}
private static String parseResponse(HttpResponse response) {
log.info("get response from http server..");
HttpEntity entity = response.getEntity();
log.info("response status: " + response.getStatusLine());
Charset charset = ContentType.getOrDefault(entity).getCharset();
if (charset != null) {
log.info(charset.name());
}
String body = null;
try {
body = EntityUtils.toString(entity, "utf-8");
log.info("body " + body);
} catch (IOException e) {
log.warn("{}: cannot parse the entity", e.getMessage());
}
return body;
}
public static String doPost(String url, JSONObject json){
// 创建httpclient对象
CloseableHttpClient httpClient = HttpClients.createDefault();
HttpPost post = new HttpPost(url);
CloseableHttpResponse response = null;
try {
//StringEntity reqEntity = new StringEntity(params,"utf-8");
StringEntity entity = new StringEntity(json.toString(),"utf-8");
//entity.setContentEncoding("UTF-8");
entity.setContentType("application/json"); // 发送json数据需要设置contentType
post.setEntity(entity);
response = httpClient.execute(post);
if(response.getStatusLine().getStatusCode() == HttpStatus.SC_OK){
// 返回json格式
return EntityUtils.toString(response.getEntity());
}
} catch (Exception e) {
log.error("通讯异常,异常信息:[{}]", e);
}
finally {
if (httpClient != null) {
try {
httpClient.close();
} catch (IOException e) {
e.printStackTrace();
}
}
if (response != null){
try {
response.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return null;
}
}
对应的vo
package com.xiaocaimi.crawl.pojo.vo;
import lombok.Data;
@Data
public class EasyfaceVo {
private String webankAppId;// 分配给服务使用方的 AppId String 腾讯云线下对接决定 是
private String nonce;// 32位随机数 String 32 是
private String version;// 1.0.0 String 20 是
private String sign;//生成算法请参见 签名算法说明 String 40 是
private String orderNo;// 订单号,由合作方上送,每次唯一 String 32 是
private String name;// 姓名 String 20 是
private String idNo;// 证件号码 String 20 是
private String userId;// 用户 ID ,用户的唯一标识(不要带有特殊字符) String 32 否
private String photoStr;//照片文件
//注意:原始图片不能超过2MB,且必须为 JPG 或 PNG 格式 Base64 String 不超过3MB 是
private String sourcePhotoType;// 比对源照片类型
//参数值为 1 时:photoStr 为身份证正面照,逻辑处理会去抠身份证头像后再去比对。
//参数值为 null 或其他:photoStr 为其他类型的照片,直接使用上送的图片去做比对。
//String 1 否
}
package com.xiaocaimi.crawl.pojo.vo;
import lombok.Data;
@Data
public class Geth5faceidVo {
private String webankAppId;// 分配给服务使用方的 AppId String 腾讯云线下对接决定 是
private String orderNo;// 订单号,由合作方上送,每次唯一 String 32 是
private String name;// 姓名 String 20 是
private String idNo;// 证件号码 String 20 是
private String userId;// 用户 ID ,用户的唯一标识(不要带有特殊字符) String 32 否
private String sourcePhotoStr;//照片文件
//注意:原始图片不能超过2MB,且必须为 JPG 或 PNG 格式 Base64 String 不超过3MB 是
private String sourcePhotoType;// 比对源照片类型
//参数值为 1 时:photoStr 为身份证正面照,逻辑处理会去抠身份证头像后再去比对。
//参数值为 null 或其他:photoStr 为其他类型的照片,直接使用上送的图片去做比对。
//String 1 否
private String version;// 1.0.0 String 20 是
private String sign;//生成算法请参见 签名算法说明 String 40 是
}
package com.xiaocaimi.crawl.pojo.vo;
import lombok.Data;
@Data
public class LoginVo {
private String webankAppId;
private String version;
private String nonce;
private String orderNo;
private String h5faceId;
private String url;
private String resultType;
private String userId;
private String sign;
private String from;
}
package com.xiaocaimi.crawl.pojo.vo;
import lombok.Data;
@Data
public class SyncVo {
private String webankAppId;
private String version;
private String nonce;
private String orderNo;
private String sign;
private String getFile;
}