fix upload data role

This commit is contained in:
Eduard Tihomirov 2024-10-15 14:47:55 +03:00
parent 6cbae50ac8
commit 09b850df49
4 changed files with 10 additions and 1 deletions

View file

@ -50,6 +50,9 @@ public class EsiaConfig {
@Value("${esia.token.url:aas/oauth2/v3/te}")
private String esiaTokenUrl;
@Value("${esia.upload.data.role}")
private String esiaUploadDataRole;
public String getEsiaOrgScopes() {
String[] scopeItems = esiaOrgScopes.split(",");
return String.join(" ", Arrays.stream(scopeItems).map(item -> orgScopeUrl + item.trim()).toArray(String[]::new));
@ -97,4 +100,8 @@ public class EsiaConfig {
public String getEsiaTokenUrl() {
return esiaTokenUrl;
}
public String getEsiaUploadDataRole() {
return esiaUploadDataRole;
}
}

View file

@ -210,7 +210,7 @@ public class UlDataServiceImpl implements UlDataService {
.build()
.send(getReq, HttpResponse.BodyHandlers.ofString());
errorHandler(getResp);
if (getResp.body().contains("MNSV89_UPLOAD_DATA")) {
if (getResp.body().contains(esiaConfig.getEsiaUploadDataRole())) {
return true;
}
else {

View file

@ -27,6 +27,7 @@ ESIA_ORG_SCOPE_URL=http://esia.gosuslugi.ru/
ESIA_BASE_URI=https://esia-portal1.test.gosuslugi.ru/
ESIA_CLIENT_ID=MNSV89
ESIA_REDIRECT_URL=https://lkrp-dev.micord.ru/ul/
ESIA_UPLOAD_DATA_ROLE=MNSV89_UPLOAD_DATA
SIGN_URL=https://ervu-sign-dev.k8s.micord.ru/sign
ESIA_CLIENT_CERT_HASH=04508B4B0B58776A954A0E15F574B4E58799D74C61EE020B3330716C203E3BDD
ERVU_KAFKA_BOOTSTRAP_SERVERS=10.10.31.11:32609

View file

@ -94,6 +94,7 @@
<property name="s3.secret_key" value="NUmY0wwRIEyAd98GCKd1cOgJWvLQYAcMMul5Ulu0"/>
<property name="av.kafka.group.id" value="1"/>
<property name="av.kafka.download.response" value="ervu.lkrp.av-fileupload-status"/>
<property name="esia.upload.data.role" value="MNSV89_UPLOAD_DATA"/>
</system-properties>
<management>
<audit-log>