Skip to content

Commit

Permalink
Merge pull request #1457 from OpenSignLabs/staging
Browse files Browse the repository at this point in the history
fix: otp auth must be disable in certificate if OTP verification is off
  • Loading branch information
prafull-opensignlabs authored Nov 13, 2024
2 parents 277cc34 + 66323f9 commit d95da53
Showing 1 changed file with 26 additions and 25 deletions.
51 changes: 26 additions & 25 deletions apps/OpenSignServer/cloud/parsefunction/pdf/GenerateCertificate.js
Original file line number Diff line number Diff line change
Expand Up @@ -458,17 +458,17 @@ export default async function GenerateCertificate(docDetails) {
});

currentPage.drawText('Viewed on :', {
x: half,
x: half + 55,
y: yPosition2,
size: text,
size: timeText,
font: timesRomanFont,
color: textKeyColor,
});

currentPage.drawText(`${new Date(x.ViewedOn).toUTCString()}`, {
x: half + 75,
x: half + 112,
y: yPosition2,
size: text,
size: timeText,
font: timesRomanFont,
color: textValueColor,
});
Expand All @@ -490,17 +490,17 @@ export default async function GenerateCertificate(docDetails) {
});

currentPage.drawText('Signed on :', {
x: half,
y: yPosition3,
size: text,
x: half + 55,
y: yPosition3 + 5,
size: timeText,
font: timesRomanFont,
color: textKeyColor,
});

currentPage.drawText(`${new Date(x.SignedOn).toUTCString()}`, {
x: half + 70,
y: yPosition3,
size: text,
x: half + 108,
y: yPosition3 + 5,
size: timeText,
font: timesRomanFont,
color: textValueColor,
});
Expand All @@ -520,22 +520,23 @@ export default async function GenerateCertificate(docDetails) {
font: timesRomanFont,
color: textValueColor,
});
currentPage.drawText('Security level :', {
x: half,
y: yPosition4,
size: text,
font: timesRomanFont,
color: textKeyColor,
});

currentPage.drawText(`Email, OTP Auth`, {
x: half + 90,
y: yPosition4,
size: text,
font: timesRomanFont,
color: textValueColor,
});

if (IsEnableOTP) {
currentPage.drawText('Security level :', {
x: half + 55,
y: yPosition4 + 10,
size: timeText,
font: timesRomanFont,
color: textKeyColor,
});
currentPage.drawText(`Email, OTP Auth`, {
x: half + 125,
y: yPosition4 + 10,
size: timeText,
font: timesRomanFont,
color: textValueColor,
});
}
currentPage.drawText('Signature :', {
x: 30,
y: yPosition5,
Expand Down

0 comments on commit d95da53

Please sign in to comment.