InitFaceController.java
1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package com.lhcredit.project.webbusiness.controller;
import com.lhcredit.common.utils.Md5Utils;
import com.lhcredit.common.utils.http.HttpUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.UUID;
@RestController
@RequestMapping("web/face/initFace")
public class InitFaceController {
@RequestMapping("/getInitFaceVerify")
@ResponseBody
public void getInitFaceVerify(){
String url = "https://cloudauth.aliyuncs.com";
String SceneId = "1000006037";
String OuterOrderNo = UUID.randomUUID().toString().replaceAll("-","");
String ProductCode = "ID_PRO";
String CertType = "IDENTITY_CARD";
String CertName = "崔世昊";
String CertNo = "211302199501100019";
String ReturnUrl = "http://www.aliyun.com\n";
String MetaInfo = "{\"bioMetaInfo\":\"4.1.0:2916352,0\",\"deviceType\":\"web\",\"ua\":\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36\"}";
// String Mobile = "18804050708";
// String Ip = "124.64.236.164";
// String UserId = "test001";
String param = "SceneId="+SceneId+"&"+
"outerOrderNo="+OuterOrderNo+"&"+
"productCode="+ProductCode+"&"+
"CertType="+CertType+"&"+
"CertName="+CertName+"&"+
"CertNo="+CertNo+"&"+
"ReturnUrl="+ReturnUrl+"&"+
"MetaInfo="+ urlEncode(MetaInfo);
String res = HttpUtils.sendGet(url,param);
}
public static String urlEncode(String content) {
try {
return URLEncoder.encode(content, "utf-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return null;
}
}