private void verify()

in src/main/java/com/epam/digital/data/platform/excerpt/api/service/DigitalSignatureService.java [82:96]


  private void verify(String signature, String data) {
    try {
      log.info("Verify Signature");
      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());
    }
  }