Skip to content

Add a /credential/raw/{file_id} route that exports raw JSON for a VC #178

@dmitrizagidulin

Description

@dmitrizagidulin

Currently, we store VCs on Google Drive wrapped in a JSON file structure.

Example VC link, https://drive.google.com/file/d/15SL9ggPrWAwj1cKYsfa5EbRGXB8fnAxN/view

Which contains the JSON file:

{"fileName":"VC","mimeType":"application/json","body":"{\"@context\": ..."}

We need to be able to export just the raw JSON of the VC, without the file wrapper.

Task:

Add a new route to the Resume Author app, something like /credential/raw/{file_id}, that loads the file, and just returns the VC itself, with the appropriate JSON content-type header.

So, the example file above could be exposed as:

/credential/raw/https://drive.google.com/file/d/15SL9ggPrWAwj1cKYsfa5EbRGXB8fnAxN

and would return the JSON:

{
  "@context": [...],
  "issuer:" "did:key:z6MktZCktMDwkX6SyEuhhpuM5RqwABCM8DqavhqpN4BZ4Ft5",
  // etc
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions