...
Enhance the implementation in Sunbird RC to take QR code type as input while generating the PDF/SVG of the certificate. The following QR code types shall be supported by Sunbird RC:
URL: Standard format to generate a QR code
W3C-VC: Default value (the current format generated by Sunbird RC)
URL-W3C-VC: new format to support backward compatibility of Sunbird consumption app
...
Info |
---|
<BaseURL>/certs/<id>?t=<QR_Code_Type>&data=<encoded W3C VC object> |
...
Code Block |
---|
https://dev.sunbirded.org/certs/8e57723e-4541-11eb-b378-0242ac130002?t=URL-W3C-VC&data=eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSIsImh0dHBzOi8vZ2lzdC5naXRodWJ1c2VyY29udGVudC5jb20vZGlsZWVwYmFwYXQvZWI5MzI1OTZhNzBmNzUwMTY0MTFjYzg3MTExM2E3ODkvcmF3LzQ5OGU1YWYxZDk0Nzg0ZjExNGIzMmMxYWI4MjdmOTUxYThhMjRkZWYvc2tpbGwiXSwidHlwZSI6WyJWZXJpZmlhYmxlQ3JlZGVudGlhbCJdLCJpc3N1YW5jZURhdGUiOiIyMDIxLTA4LTI3VDEwOjU3OjU3LjIzN1oiLCJjcmVkZW50aWFsU3ViamVjdCI6eyJ0eXBlIjoiUGVyc29uIiwibmFtZSI6IlN1bmJpcmQgTGVhcm5lciIsInRyYWluZWRPbiI6IlN1bmJpcmQgUkMgQ2VydGlmaWNhdGUgTW9kdWxlIn0sImlzc3VlciI6ImRpZDp3ZWI6c3VuYmlyZHJjLmRldi92Yy9za2lsbCIsInByb29mIjp7InR5cGUiOiJFZDI1NTE5U2lnbmF0dXJlMjAxOCIsImNyZWF0ZWQiOiIyMDIyLTAyLTE3VDE2OjU2OjUxWiIsInZlcmlmaWNhdGlvbk1ldGhvZCI6ImRpZDppbmRpYSIsInByb29mUHVycG9zZSI6ImFzc2VydGlvbk1ldGhvZCIsImp3cyI6ImV5SmhiR2NpT2lKRlpFUlRRU0lzSW1JMk5DSTZabUZzYzJVc0ltTnlhWFFpT2xzaVlqWTBJbDE5Li5OSk9LOFlya2t1Y3ZZRndjZl9QNi0wQ0lnM0xiaHU1R25BdFB3YmprdVNMUmxod0ZLR2s4b0hrWnN6czdSeHdDY3oxREctaENJaXNwTHZEeF8wYVNDQSJ9fQ== |
...
if the QR code is in “URL-W3C-VC“ format, 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, 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>