private void verify()

in src/main/java/com/epam/digital/data/platform/restapi/core/service/DigitalSignatureService.java [84:97]


  private void verify(String signature, String data) {
    try {
      log.info("Verifying {}", Header.X_DIGITAL_SIGNATURE_DERIVED.getHeaderName());
      VerificationResponseDto responseDto = digitalSealRestClient.verify(new VerificationRequestDto(signature, data));

      if (!responseDto.isValid()) {
        throw new InvalidSignatureException(responseDto.getError().getMessage());
      }
    } catch (BadRequestException e) {
      throw new KepServiceBadRequestException(e.getMessage());
    } catch (InternalServerErrorException e) {
      throw new KepServiceInternalServerErrorException(e.getMessage());
    }
  }