refactor: update PDF seal text, improve CCSP logging, and add signed PDF response aliases
This commit is contained in:
+4
-3
@@ -1250,11 +1250,12 @@
|
||||
pdfAlert.className = 'alert alert-success';
|
||||
pdfAlert.textContent = '✓ Documento PDF assinado com sucesso via PAdES (ISO 32000)!';
|
||||
|
||||
currentSignedPdfBase64 = result.signed_pdf;
|
||||
const signedPdfBase64 = result.signedPdf || result.signed_pdf || '';
|
||||
currentSignedPdfBase64 = signedPdfBase64;
|
||||
pdfResultCard.style.display = 'block';
|
||||
pdfResultSize.textContent = (result.signed_pdf.length * 0.75 / 1024).toFixed(1) + ' KB';
|
||||
pdfResultSize.textContent = (signedPdfBase64.length * 0.75 / 1024).toFixed(1) + ' KB';
|
||||
pdfResultSha256.textContent = result.sha256 || 'Calculado com sucesso';
|
||||
pdfResultBase64.textContent = result.signed_pdf;
|
||||
pdfResultBase64.textContent = signedPdfBase64;
|
||||
pdfResultCard.scrollIntoView({ behavior: 'smooth' });
|
||||
} catch (err) {
|
||||
pdfAlert.className = 'alert alert-error';
|
||||
|
||||
@@ -35,8 +35,8 @@ export class PdfSealDesigner {
|
||||
textColor: '#0f172a',
|
||||
iconStyle: 'shield',
|
||||
customLogoBase64: null,
|
||||
customHeader: 'CYBERCORE • ICP-BRASIL',
|
||||
customFooter: 'Validade jurídica assegurada pela MP nº 2.200-2/2001',
|
||||
customHeader: 'DOCUMENTO ASSINADO DIGITALMENTE',
|
||||
customFooter: 'Verifique a autenticidade da assinatura eletrônica em https://validar.iti.gov.br',
|
||||
customFieldLabel: 'Cargo',
|
||||
customFieldValue: 'Diretor Responsável',
|
||||
defaultCpfMode: 'MASKED',
|
||||
|
||||
@@ -392,6 +392,7 @@ export class CyberCoreSigner {
|
||||
requestId: resp.request_id,
|
||||
status: resp.status,
|
||||
signedPdf: signedPdfBase64,
|
||||
signed_pdf: signedPdfBase64,
|
||||
sha256: resp.sha256,
|
||||
signature: resp.signature,
|
||||
certificate: resp.certificate,
|
||||
|
||||
Reference in New Issue
Block a user