...
Code Block |
---|
const qrType = process.env.QR_TYPE || 'W3C-VC'; const certDomainUrl = process.env.CERTIFICATE_DOMAIN_URL || "https://dev.sunbirded.org"; |
We are supporting 2 types of qr code.
W3C-VC (old)
URL-W3C-VC (new)
according to the formate what you need, change the process.env.QR_TYPE
variable;
change the signingKeyType
to KeyType.RSA
in /sunbird-rc-core/services/certificate-signer/configs/keys.js
...
To make the Sunbird RC QR codes compatible with the existing version of Sunbird consumption app, the QR code generated by Sunbird RC should also be a URL. The proposed solution is to enable a provision in Sunbird RC to generate the QR code in URL format along with the W3C-VC data.
...
...
Request:
Code Block |
---|
{{host}}/api/v1/TrainingCertificate/1-969a75a1-ac69-4a5b-a67b-092ddd4b29e2 |
Curl
Code Block |
---|
curl --location --request GET 'http://localhost:8081/api/v1/TrainingCertificate/1-969a75a1-ac69-4a5b-a67b-092ddd4b29e2' \
--header 'Accept: image/svg+xml' \
--header 'template: https://sunbirddev.blob.core.windows.net/sunbird-content-dev/content/do_1131445945205145601809/artifact/template-2.svg' |
Response:
We will get SVG file as a response.
...