SUPPORT-8817: fix for review (4)
This commit is contained in:
parent
5081cbd5b8
commit
f1c274d267
3 changed files with 3 additions and 8 deletions
|
|
@ -49,11 +49,6 @@ public class ExtractController {
|
|||
public ResponseEntity<Resource> getExtract(@PathVariable String formatRegistry) {
|
||||
UserIdsPair userIdsPair = SecurityUtil.getUserIdsPair();
|
||||
|
||||
if (userIdsPair == null || (userIdsPair.getErvuId() == null
|
||||
&& userIdsPair.getEsiaUserId() == null)) {
|
||||
return ResponseEntity.noContent().build();
|
||||
}
|
||||
|
||||
String ervuId = userIdsPair.getErvuId();
|
||||
byte[] reply;
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ import ru.micord.ervu.security.webbpm.jwt.helper.SecurityHelper;
|
|||
import ru.micord.ervu.security.webbpm.jwt.service.JwtTokenService;
|
||||
import ru.micord.ervu.security.webbpm.jwt.model.Token;
|
||||
|
||||
import static ru.micord.ervu.security.webbpm.jwt.util.SecurityUtil.getUserAccountId;
|
||||
import static ru.micord.ervu.security.webbpm.jwt.util.SecurityUtil.getCurrentUserEsiaId;
|
||||
|
||||
/**
|
||||
* @author Eduard Tihomirov
|
||||
|
|
@ -383,7 +383,7 @@ public class EsiaAuthService {
|
|||
|
||||
private String getMessageId(Exception exception) {
|
||||
return Integer.toUnsignedString(Objects
|
||||
.hashCode(getUserAccountId()), 36)
|
||||
.hashCode(getCurrentUserEsiaId()), 36)
|
||||
+ "-"
|
||||
+ Integer.toUnsignedString(exception.hashCode(), 36);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public final class SecurityUtil {
|
|||
.orElse(null);
|
||||
}
|
||||
|
||||
public static String getUserAccountId() {
|
||||
public static String getCurrentUserEsiaId() {
|
||||
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
|
||||
if (auth != null && auth.isAuthenticated()) {
|
||||
return auth.getName();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue