From 3ea1e01a1aa051f7ce250f1da44d9f1f3bc655b4 Mon Sep 17 00:00:00 2001 From: "adel.ka" Date: Fri, 28 Nov 2025 14:20:59 +0300 Subject: [PATCH] =?UTF-8?q?SUPPORT-9605:=20=D1=83=D0=B1=D1=80=D0=B0=D0=BB?= =?UTF-8?q?=20=D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8=D0=B5=20=D1=82?= =?UTF-8?q?=D0=BE=D0=BA=D0=B5=D0=BD=D0=B0=20=D1=81=20finally?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../micord/ervu/security/esia/service/EsiaAuthService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/ru/micord/ervu/security/esia/service/EsiaAuthService.java b/backend/src/main/java/ru/micord/ervu/security/esia/service/EsiaAuthService.java index 9db721d2..a70c5ba5 100644 --- a/backend/src/main/java/ru/micord/ervu/security/esia/service/EsiaAuthService.java +++ b/backend/src/main/java/ru/micord/ervu/security/esia/service/EsiaAuthService.java @@ -280,7 +280,7 @@ public class EsiaAuthService { Thread.currentThread().getId(), timeSignSecret, timeRequestAccessToken, timeVerifySecret); } OrgInfo orgInfo = null; - String status = null, ervuId = null; + String status = null; try { orgInfo = getOrgInfo(esiaAccessTokenStr); hasRole = ulDataService.checkRole(esiaAccessTokenStr); @@ -289,8 +289,9 @@ public class EsiaAuthService { LOGGER.error("The user with id = " + prnOid + " does not have the required role"); throw new LocalizedException("access_denied", MESSAGE_SOURCE); } - ervuId = getErvuId(prnOid, orgInfo); + String ervuId = getErvuId(prnOid, orgInfo); status = AuditConstants.SUCCESS_STATUS_TYPE; + createTokenAndAddCookie(response, prnOid, ervuId, hasRole, fileUploadAllowed, expiresIn); } catch (JsonProcessingException e) { throw new EsiaException(e); @@ -303,7 +304,6 @@ public class EsiaAuthService { auditService.processAuthEvent(request, orgInfo, prnOid, status, AuditConstants.LOGIN_EVENT_TYPE); } - createTokenAndAddCookie(response, prnOid, ervuId, hasRole, fileUploadAllowed, expiresIn); } }