11.8kaifa
This commit is contained in:
@@ -333,9 +333,9 @@ public class SignAward {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取机构认证链接
|
||||
* 获取机构认证&授权页面链接
|
||||
*
|
||||
* @return
|
||||
* @throws EsignDemoException
|
||||
*/
|
||||
public static EsignHttpResponse deptIdentifyUrl(DeptIdentify deptIdentify) throws EsignDemoException {
|
||||
String apiaddr = "/v3/org-auth-url";
|
||||
@@ -343,17 +343,27 @@ public class SignAward {
|
||||
String phonenumber = deptIdentify.getPhonenumber();
|
||||
String deptName = deptIdentify.getDeptName();
|
||||
String jsonParm = "{\n" +
|
||||
" \"orgAuthConfig\": {\n" +
|
||||
" \"orgName\": \"" + deptName + "\",\n" +
|
||||
" \"transactorInfo\": {\n" +
|
||||
" \"psnAccount\": \"" + phonenumber + "\",\n" +
|
||||
" \"psnInfo\": {\n" +
|
||||
" \"psnName\": \"" + nickName + "\",\n" +
|
||||
" \"psnMobile\": \"" + phonenumber + "\"\n" +
|
||||
" }\n" +
|
||||
|
||||
" }\n" +
|
||||
" \"orgAuthConfig\": {\n" +
|
||||
" \"orgName\": \"" + deptName + " \",\n" +
|
||||
" \"transactorInfo\": {\n" +
|
||||
" \"psnAccount\": \"" + phonenumber + "\",\n" +
|
||||
" \"psnInfo\": {\n" +
|
||||
" \"psnName\": \"" + nickName + "\",\n" +
|
||||
" \"psnMobile\": \"" + phonenumber + "\"\n" +
|
||||
" }\n" +
|
||||
" }\n" +
|
||||
" },\n" +
|
||||
" \"authorizeConfig\": {\n" +
|
||||
" \"authorizedScopes\": [\n" +
|
||||
" \"get_org_identity_info\",\n" +
|
||||
" \"get_psn_identity_info\",\n" +
|
||||
" \"org_initiate_sign\",\n" +
|
||||
" \"psn_initiate_sign\",\n" +
|
||||
" \"manage_org_resource\",\n" +
|
||||
" \"manage_psn_resource\",\n" +
|
||||
" \"use_org_order\"\n" +
|
||||
" ]\n" +
|
||||
" }\n" +
|
||||
"}";
|
||||
//请求方法
|
||||
EsignRequestType requestType = EsignRequestType.POST;
|
||||
@@ -417,7 +427,32 @@ public class SignAward {
|
||||
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 创建机构图片印章
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static EsignHttpResponse createOrgByImage(DeptIdentify deptIdentify) throws EsignDemoException {
|
||||
String apiaddr = "/v3/seals/org-seals/create-by-image";
|
||||
String orgId = deptIdentify.getOrgId();
|
||||
String sealImageFileKey = "";
|
||||
//请求参数body体,json格式。get或者delete请求时jsonString传空json:"{}"或者null
|
||||
String jsonParm = "{\n" +
|
||||
" \"orgId\": \"" + orgId + "\",\n" +
|
||||
" \"sealImageFileKey\": \"" + sealImageFileKey + "\",\n" +
|
||||
" \"sealName\": \"企业公章1\",\n" +
|
||||
" \"sealWidth\": 50,\n" +
|
||||
" \"sealHeight\": 50,\n" +
|
||||
"}";
|
||||
//请求方法
|
||||
EsignRequestType requestType = EsignRequestType.POST;
|
||||
//生成签名鉴权方式的的header
|
||||
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, true);
|
||||
//发起接口请求
|
||||
EsignHttpResponse response = EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true);
|
||||
System.out.println(response);
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user