Introduction:
The Sunbird Lern BB will is migrating to use Sunbird RC to enable the credentials capability and generate verifiable credentials when a milestone was achieved by the users of the platform.
With the existing implementation(without Sunbird RC), Sunbird adoptors generated millions of credentials. So, it is important to support backward compatibility.
The printable format (PDF or SVG) contains the details of the credential and a QR code to scan and verify it. The QR code format and verification process are different in existing implementation and in Sunbird RC.
This wiki explains the key problems for generating QR codes and verifying the credentials with backward compatibility and a proposed solution to handle itfor generating & issuing e-credentials in its use cases (e.g.: course completion certificate). When a printable version of the certificate (PDF or SVG) is generated by Sunbird RC, the QR code in the PDF/SVG contains the certificate JSON data encoded in it. This is different from the current implementation in Sunbird Lern which encodes a URL in the QR code.
Sunbird Ed consumption app has implementation to verify the certificates by scanning the QR codes on the certificate PDF/SVG file. However, the consumption app assumes that the QR code is always a URL and redirects the user to that URL. And currently, some of the Sunbird adopters have millions of active installs of this version of Sunbird consumption app.
When new certificates are generated with QR codes that do not contain a URL, this version of Sunbird mobile app will not be able to parse it and throws an error. This wiki provides the details of current Sunbird RC implementation and proposed changes to QR code generation & verification so that backward compatibility issues are addressed.
Problem statement:
The current Sunbird consumption app QR code scanner assumes that the scanned QR code is always a URL and it redirects to that path for further processing. But, in the case of Sunbird RC, the QR code gives a JSON object (W3C VC). So, the consumption app defines it as an invalid QR code.
...
if the QR code is in “URL-W3C-VC“ format, it the app parses the QR code to get certificate data from the URL query parameter and does verification of the certificate signature & data within the app itself (there will be no redirection to a portal web page).
if the QR code is in “W3C-VC“ format, it the app validates the certificate signature & data encoded in the QR code. This is to ensure that the Sunbird consumption app is compliant with both types of QR codes supported by Sunbird RC.
else, if the QR code contains any other URL, the app shall redirect the user to the specified URL.
...
Conclusion:
<TODO>