Merge branch 'master' into develop

# Conflicts:
#	backend/pom.xml
#	backend/src/main/java/ru/micord/ervu/security/esia/service/EsiaAuthService.java
#	distribution/pom.xml
#	frontend/pom.xml
#	pom.xml
#	resources/pom.xml
This commit is contained in:
gulnaz 2025-01-23 12:36:41 +03:00
commit 87debfc1b5

View file

@ -124,4 +124,23 @@ public class EsiaPersonalDataService implements PersonalDataService {
throw new EsiaException(e);
}
}
@Override
public EsiaHeader readHeader(String accessToken) {
try {
byte[] decodedBytes = Base64.getDecoder()
.decode(
accessToken.substring(0, accessToken.indexOf('.'))
.replace('-', '+')
.replace('_', '/'));
String decodedString = new String(decodedBytes);
EsiaHeader esiaHeader = objectMapper.readValue(decodedString,
EsiaHeader.class
);
return esiaHeader;
}
catch (Exception e) {
throw new EsiaException(e);
}
}
}