SUPPORT-9339: Fix
This commit is contained in:
parent
7153e347eb
commit
a4336807cb
2 changed files with 8 additions and 1 deletions
|
|
@ -449,7 +449,7 @@ public class EmployeeInfoFileUploadService {
|
||||||
|
|
||||||
private VerifyDocumentSignResponse validateSign(MultipartFile file, MultipartFile signFile) {
|
private VerifyDocumentSignResponse validateSign(MultipartFile file, MultipartFile signFile) {
|
||||||
try (CloseableHttpClient httpClient = HttpClients.createDefault()) {
|
try (CloseableHttpClient httpClient = HttpClients.createDefault()) {
|
||||||
HttpPost upload = new HttpPost(esiaConfig.getSignUrl());
|
HttpPost upload = new HttpPost(esiaConfig.getFileSignVerifyUrl());
|
||||||
HttpEntity multipart = MultipartEntityBuilder.create()
|
HttpEntity multipart = MultipartEntityBuilder.create()
|
||||||
.addBinaryBody("data", file.getBytes(), ContentType.APPLICATION_OCTET_STREAM,
|
.addBinaryBody("data", file.getBytes(), ContentType.APPLICATION_OCTET_STREAM,
|
||||||
file.getOriginalFilename()
|
file.getOriginalFilename()
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,9 @@ public class EsiaConfig {
|
||||||
@Value("${esia.login.attempts.count:5}")
|
@Value("${esia.login.attempts.count:5}")
|
||||||
private long esiaLoginAttemptsCount;
|
private long esiaLoginAttemptsCount;
|
||||||
|
|
||||||
|
@Value("${file.sign.verify.url}")
|
||||||
|
private String fileSignVerifyUrl;
|
||||||
|
|
||||||
public String getEsiaOrgScopes() {
|
public String getEsiaOrgScopes() {
|
||||||
String[] scopeItems = esiaOrgScopes.split(",");
|
String[] scopeItems = esiaOrgScopes.split(",");
|
||||||
return String.join(" ", Arrays.stream(scopeItems).map(item -> orgScopeUrl + item.trim()).toArray(String[]::new));
|
return String.join(" ", Arrays.stream(scopeItems).map(item -> orgScopeUrl + item.trim()).toArray(String[]::new));
|
||||||
|
|
@ -146,4 +149,8 @@ public class EsiaConfig {
|
||||||
public long getEsiaLoginAttemptsCount() {
|
public long getEsiaLoginAttemptsCount() {
|
||||||
return esiaLoginAttemptsCount;
|
return esiaLoginAttemptsCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getFileSignVerifyUrl() {
|
||||||
|
return fileSignVerifyUrl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue