| | |
| | | // 生产环境建议使用更安全的密钥管理方案,如密钥管理系统(KMS)、容器密钥注入等 |
| | | // 请参见:https://cloud.tencent.com/document/product/1278/85305 |
| | | // 密钥可前往官网控制台 https://console.cloud.tencent.com/cam/capi 进行获取 |
| | | Credential cred = new Credential("AKIDRlDTWVIrDOMAl8LMCoF6nGXdXEh19EHC", "tsjPtFQPwX6kGdpgSSI0UmyFQRZeboqe"); |
| | | Credential cred = new Credential("AKIDZBew0rJbghYnt20oRr44qQpDViu6HMGx", "pRvd9ez71iBSXO1PYrwnPyMVRAew53mH"); |
| | | // 使用临时密钥示例 |
| | | // Credential cred = new Credential("SecretId", "SecretKey", "Token"); |
| | | // 实例化一个http选项,可选的,没有特殊需求可以跳过 |
| | |
| | | // 实例化一个请求对象,每个接口都会对应一个request对象 |
| | | IdCardVerificationRequest req = new IdCardVerificationRequest(); |
| | | req.setIdCard("511028200002150816"); |
| | | req.setName("刘1"); |
| | | req.setName("刘杰"); |
| | | // 返回的resp是一个IdCardVerificationResponse的实例,与请求对象对应 |
| | | IdCardVerificationResponse resp = client.IdCardVerification(req); |
| | | if(resp.getResult().equals("0")){ |