/
Sunbird RC QR code generation

Sunbird RC QR code generation

 

Introduction

This document describes implementation of sunbird rc qr code generation based on the wiki.

SB-29126: Contribute to RC on QR code genration with specific typeReleased

Problem Statement

To support the backward compatibility for qr code generation.

Prerequisite

Add the below data in /sunbird-rc-core/services/certificate-api/configs/keys.js

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.

  1. W3C-VC (old)

  2. 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

const signingKeyType = process.env.SIGNING_KEY_TYPE || KeyType.RSA;

Solution

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:

{{host}}/api/v1/TrainingCertificate/1-969a75a1-ac69-4a5b-a67b-092ddd4b29e2

Curl

Response:

We will get SVG file as a response.

 

 

Related content

Sunbird RC QR code backward compatibility support for SunbirdEd
Sunbird RC QR code backward compatibility support for SunbirdEd
More like this
Certificate generation using Sunbird RC (migration from Lern to RC)
Certificate generation using Sunbird RC (migration from Lern to RC)
More like this
sunbird-lms-service will directly fetch SSO_PUBLICKEY from KeyCloakServer and use it for authetication and other purpose
sunbird-lms-service will directly fetch SSO_PUBLICKEY from KeyCloakServer and use it for authetication and other purpose
More like this