增加了云证书吊销接口,修改了测试文件
This commit is contained in:
@@ -62,4 +62,35 @@ class CaOnline extends Ca
|
||||
throw new BusinessException($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 吊销云证书
|
||||
* @param array $data
|
||||
* @param string $type
|
||||
* @return mixed
|
||||
*/
|
||||
public function removeCloudCert(array $data, string $type = "Personal"): mixed
|
||||
{
|
||||
$option = [
|
||||
'form_params' => [
|
||||
'entityId' => $data['user_id'], // 用户唯一标识,由业务系统定义
|
||||
'pin' => $data['user_id'], // 证书PIN码
|
||||
'authType' => "实人认证", // 委托鉴证方式[实人认证、线下认证、其它方式认证]
|
||||
'authTime' => time(), // 委托鉴证时间(鉴证完成的时间戳)单位:秒
|
||||
'authResult' => "认证通过", // 委托鉴证结果[认证通过]
|
||||
'authNoticeType' => "数字证书吊销告知", // 委托鉴证告知类型[数字证书申请告知]
|
||||
]
|
||||
];
|
||||
|
||||
try {
|
||||
$response = $this->httpRequest($this->api_url . '/cloud-certificate-service' . '/api/cloudCert/open/v2/cert/certRevoke', $option);
|
||||
if (empty($response)) {
|
||||
// 返回值为空
|
||||
throw new BusinessException(HttpEnumCode::getMessage(HttpEnumCode::SERVER_ERROR));
|
||||
}
|
||||
return $response;
|
||||
} catch (GuzzleException $e) {
|
||||
throw new BusinessException($e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user