{ "info": { "_postman_id": "0b8a4a7f-f952-4403-a9a4-909b37b8fa24", "name": "Conformance Suite", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "Clear Cache", "item": [ { "name": "Clear Token Cache", "event": [ { "listen": "prerequest", "script": { "exec": [ "pm.globals.unset(\"tokenCache\");", "" ], "type": "text/javascript" } } ], "request": { "method": "HEAD", "header": [], "url": { "raw": "www.example.com", "host": [ "www", "example", "com" ] } }, "response": [] }, { "name": "Clear DID Web Cache", "event": [ { "listen": "prerequest", "script": { "exec": [ "pm.globals.unset(\"didWebCache\");", "" ], "type": "text/javascript" } } ], "request": { "method": "HEAD", "header": [], "url": { "raw": "www.example.com", "host": [ "www", "example", "com" ] } }, "response": [] } ] }, { "name": "Discovery - API Configuration", "item": [ { "name": "Positive Testing", "item": [ { "name": "did_json", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema200ApiConfiguration\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{did_web_endpoint}}", "host": [ "{{did_web_endpoint}}" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "// Discovery requires a multi-tenant aware did web endpoint", "const did_web = pm.environment.get(\"ORGANIZATION_DID_WEB\");", "const did_web_endpoint = utils(pm).convertDidWebToEndpoint(did_web);", "pm.variables.set('did_web_endpoint', did_web_endpoint);", "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Identifiers - Resolve", "item": [ { "name": "Negative Testing", "item": [ { "name": "Bad Request", "item": [ { "name": "did:invalid", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400Identifiers\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{API_BASE_URL}}/identifiers/invalid_did", "host": [ "{{API_BASE_URL}}" ], "path": [ "identifiers", "invalid_did" ] } }, "response": [] }, { "name": "did:not_found:did_web", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 404\", function () {", " pm.response.to.have.status(404);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema404\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{API_BASE_URL}}/identifiers/did:web:example.com", "host": [ "{{API_BASE_URL}}" ], "path": [ "identifiers", "did:web:example.com" ] } }, "response": [] }, { "name": "did:not_found:urn", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 404\", function () {", " pm.response.to.have.status(404);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema404\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{API_BASE_URL}}/identifiers/urn:uuid:{{$randomUUID}}", "host": [ "{{API_BASE_URL}}" ], "path": [ "identifiers", "urn:uuid:{{$randomUUID}}" ] } }, "response": [] } ] }, { "name": "Bad Auth", "item": [ { "name": "identifiers:missing_auth", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 401\", function () {", " pm.response.to.have.status(401);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema401\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "noauth" }, "method": "GET", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "url": { "raw": "{{API_BASE_URL}}/identifiers/{{ORGANIZATION_DID_WEB}}", "host": [ "{{API_BASE_URL}}" ], "path": [ "identifiers", "{{ORGANIZATION_DID_WEB}}" ] } }, "response": [] } ] } ] }, { "name": "Positive Testing", "item": [ { "name": "identifiers", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema200Identifiers\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString), {", " strict: true,", " strictSchema: true,", " });", "});" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{API_BASE_URL}}/identifiers/{{ORGANIZATION_DID_WEB}}", "host": [ "{{API_BASE_URL}}" ], "path": [ "identifiers", "{{ORGANIZATION_DID_WEB}}" ] } }, "response": [] } ] } ], "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{currentAccessToken}}", "type": "string" } ] }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "// Obtain an access token", "utils(pm).getAccessToken();", "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Credentials - Create", "item": [ { "name": "Negative Testing", "item": [ { "name": "Bad Request", "item": [ { "name": "credentials_issue:credential:missing", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // \"credential\" is a required field", " delete req.credential;", "}));", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.@context:missing", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // \"credential.@context\" is a required field", " delete req.credential[\"@context\"];", "}));", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.@context:boolean", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // \"credential.@context\" must be an array, not a boolean", " req.credential[\"@context\"] = false;", "}));", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.@context:integer Copy", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // \"credential.@context\" must be an array, not an integer", " req.credential[\"@context\"] = 42;", "}));", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.@context:null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // \"credential.@context\" must be an array, not null", " req.credential[\"@context\"] = null;", "}));", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.@context:object", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // \"credential.@context\" must be an array, not an object", " req.credential[\"@context\"] = {\"@vocab\": \"https://www.w3.org/2018/credentials/v1\"};", "}));", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.@context:string", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // \"credential.@context\" must be an array, not a string", " req.credential[\"@context\"] = \"https://www.w3.org/2018/credentials/v1\";", "}));", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.@context.item.array", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // Elements of credential.@context array must be string, not array", " req.credential[\"@context\"] = [", " \"https://www.w3.org/2018/credentials/v1\",", " [\"https://w3id.org/traceability/v1\"],", " ];", "}));", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.@context.item.boolean", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // Elements of credential.@context array must be string, not boolean", " req.credential[\"@context\"] = [", " \"https://www.w3.org/2018/credentials/v1\",", " false,", " ];", "}));", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.@context.item.integer", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // Elements of credential.@context array must be string, not integer", " req.credential[\"@context\"] = [", " \"https://www.w3.org/2018/credentials/v1\",", " 42,", " ];", "}));", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.@context.item.null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // Elements of credential.@context array must be string, not integer", " req.credential[\"@context\"] = [", " \"https://www.w3.org/2018/credentials/v1\",", " null,", " ];", "}));", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.@context.item.object", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // Elements of credential.@context array must be string, not object", " req.credential[\"@context\"] = [", " \"https://www.w3.org/2018/credentials/v1\",", " {\"@vocab\": \"https://w3id.org/traceability/v1\"},", " ];", "}));", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.id:array", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // Optional credential.id must be string, not array", " req.credential.id = [pm.variables.get(\"credentialId\")];", "}));", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.id:boolean", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // Optional credential.id must be string, not boolean", " req.credential.id = false;", "}));", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.id:integer", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // Optional credential.id must be string, not integer", " req.credential.id = 42;", "}));", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.id:null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // Optional credential.id must be string, not null", " req.credential.id = null;", "}));", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.id:object", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // Optional credential.id must be string, not object", " req.credential.id = {\"id\": pm.variables.get(\"credentialId\")};", "}));", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.type:missing", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.type is a required property", " delete req.credential.type;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.type:boolean", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.type must be array, not boolean", " req.credential.type = false;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.type:integer", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.type must be array, not integer", " req.credential.type = 42;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.type:null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.type must be array, not null", " req.credential.type = null;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.type:object", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.type must be array, not object", " req.credential.type = {};", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.type:string", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.type must be array, not string", " req.credential.type = \"VerifiableCredential\";", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.type.item:missing", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.type must have at least one element", " req.credential.type = [];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.type.item:array", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.type elements must be string, not array", " req.credential.type = [", " \"VerifiableCredential\",", " [\"AnotherType\"],", " ];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.type.item:boolean", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.type elements must be string, not boolean", " req.credential.type = [", " \"VerifiableCredential\",", " false,", " ];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.type.item:integer", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.type elements must be string, not integer", " req.credential.type = [", " \"VerifiableCredential\",", " 42,", " ];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.type.item:null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.type elements must be string, not null", " req.credential.type = [", " \"VerifiableCredential\",", " null,", " ];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.type.item:object", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.type elements must be string, not object", " req.credential.type = [", " \"VerifiableCredential\",", " {},", " ];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.issuer:missing", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.issuer is a required property", " delete req.credential.issuer;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.issuer:array", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.issuer must be string or object with id, not array", " req.credential.issuer = [pm.variables.get(\"issuer\")];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.issuer:boolean", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.issuer must be string or object with id, not boolean", " req.credential.issuer = false;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.issuer:integer", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.issuer must be string or object with id, not integer", " req.credential.issuer = 42;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.issuer:null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.issuer must be string or object with id, not null", " req.credential.issuer = null;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue.credential.issuer:invalid", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.issuer must be a valid URI", " req.credential.issuer = \"not.a.uri\"", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue.credential.issuer:unknown", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 422\", function () {", " pm.response.to.have.status(422);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema422CredentialsIssue\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.issuer must be known to the endpoint.", " req.credential.issuer = \"urn:uuid:{{$randomUUID}}\";", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.issuer.id:missing", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.issuer.id is required when issuer is in object format", " req.credential.issuer = {};", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.issuer.id:array", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.issuer.id must be string, not array", " req.credential.issuer = {\"id\": [pm.variables.get(\"issuer\")]};", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.issuer.id:boolean", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.issuer.id must be string, not boolean", " req.credential.issuer = {\"id\": false};", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.issuer.id:integer", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.issuer.id must be string, not integer", " req.credential.issuer = {\"id\": 42};", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.issuer.id:null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.issuer.id must be string, not null", " req.credential.issuer = {\"id\": null};", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue.credential.issuer.id:invalid", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.issuer.id must be a valid URI", " req.credential.issuer = {\"id\": \"not.a.uri\"}", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue.credential.issuer.id:unknown", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 422\", function () {", " pm.response.to.have.status(422);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema422CredentialsIssue\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.issuer.id must be known to the endpoint.", " req.credential.issuer = {\"id\": \"urn:uuid:{{$randomUUID}}\"};", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.issuanceDate.missing", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.issuanceDate is a required property", " delete req.credential.issuanceDate;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.issuanceDate:array", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.issuanceDate must be string, not array", " req.credential.issuanceDate = [pm.variables.get(\"issuanceDate\")];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.issuanceDate:boolean", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.issuanceDate must be string, not boolean", " req.credential.issuanceDate = false;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.issuanceDate:integer", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.issuanceDate must be string, not integer", " req.credential.issuanceDate = 42;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.issuanceDate:null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.issuanceDate must be string, not null", " req.credential.issuanceDate = null;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.issuanceDate:object", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.issuanceDate must be string, not object", " req.credential.issuanceDate = {};", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.issuanceDate:invalid_value", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.issuanceDate must be a valid XML date time string", " req.credential.issuanceDate = \"not an xml date time string\";", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.credentialSubject:missing", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.credentialSubject is a required property", " delete req.credential.credentialSubject;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.credentialSubject:array", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.credentialSubject must be object, not array", " req.credential.credentialSubject = [pm.variables.get(\"credentialSubject\")];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.credentialSubject:boolean", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.credentialSubject must be object, not boolean", " req.credential.credentialSubject = false;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.credentialSubject:integer", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.credentialSubject must be object, not integer", " req.credential.credentialSubject = 42;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.credentialSubject:null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.credentialSubject must be object, not null", " req.credential.credentialSubject = null;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.credentialSubject:string", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.credentialSubject must be object, not string.", " req.credential.credentialSubject = pm.variables.get(\"credentialSubject\");", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.credentialSubject.id:array", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.credentialSubject.id must be string, not array", " req.credential.credentialSubject = {\"id\": [pm.variables.get(\"credentialSubject\")]};", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.credentialSubject.id:array Copy", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.credentialSubject.id must be string, not boolean", " req.credential.credentialSubject = {\"id\": false};", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.credentialSubject.id:array Copy 2", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.credentialSubject.id must be string, not integer", " req.credential.credentialSubject = {\"id\": 42};", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.credentialSubject.id:array Copy 3", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.credentialSubject.id must be string, not null", " req.credential.credentialSubject = {\"id\": null};", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.credentialSubject.id:array Copy 4", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.credentialSubject.id must be string, not object", " req.credential.credentialSubject = {\"id\": {}};", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options:missing", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options is a required property", " delete req.options;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options:array", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options must be object, not array", " req.options = [];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options:boolean", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options must be object, not boolean", " req.options = false;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options:integer", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options must be object, not integer", " req.options = 42;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options:null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options must be object, not null", " req.options = null;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options:string", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options must be object, not string", " req.options = \"\";", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.type:missing", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.type is a required property", " delete req.options.type;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.type:array", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.type must be string, not array", " req.options.type = [\"Ed25519Signature2018\"];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.type:boolean", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.type must be string, not boolean", " req.options.type = false;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.type:integer", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.type must be string, not integer", " req.options.type = 42;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.type:null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.type must be string, not null", " req.options.type = null;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.type:object", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.type must be string, not object", " req.options.type = {};", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.type:invalid_value", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.type must be one of the valid values", " req.options.type = \"invalid value\";", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.created:array", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.created must be string, not array", " req.options.created = [pm.variables.get(\"created\")];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.created:boolean", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.created must be string, not boolean", " req.options.created = false;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.created:integer", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.created must be string, not integer", " req.options.created = 42;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.created:null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.created must be string, not null", " req.options.created = null;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.created:object", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.created must be string, not object", " req.options.created = {};", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.created:invalid", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.created must be a valid XML date time string", " req.options.created = \"not an xml date time string\";", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.credentialStatus:array", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.credentialStatus must be object, not array", " req.options.credentialStatus = [\"StatusList2021Entry\"];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.credentialStatus:boolean", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.credentialStatus must be object, not boolean", " req.options.credentialStatus = false;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.credentialStatus:integer", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.credentialStatus must be object, not integer", " req.options.credentialStatus = 42;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.credentialStatus:null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.credentialStatus must be object, not null", " req.options.credentialStatus = null;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.credentialStatus:string", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.credentialStatus must be object, not string", " req.options.credentialStatus = \"StatusList2021Entry\";", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.credentialStatus.type:missing", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.credentialStatus must contain \"type\" when present ", " req.options.credentialStatus = {};", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.credentialStatus.type:array", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.credentialStatus.type must be string, not array", " req.options.credentialStatus = {\"type\": [\"StatusList2021Entry\"]};", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.credentialStatus.type:boolean", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.credentialStatus.type must be string, not boolean", " req.options.credentialStatus = {\"type\": false};", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.credentialStatus.type:integer", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.credentialStatus.type must be string, not integer", " req.options.credentialStatus = {\"type\": 42};", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.credentialStatus.type:null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.credentialStatus.type must be string, not null", " req.options.credentialStatus = {\"type\": null};", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.credentialStatus.type:null Copy", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.credentialStatus.type must be string, not object", " req.options.credentialStatus = {\"type\": {}};", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options.credentialStatus.type:invalid", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.credentialStatus.type must be a valid value", " req.options.credentialStatus = {\"type\": \"invalid value\"};", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] } ], "description": "This folder contains requests which mutate a valid request body in a way that should provoke a \"400 Bad Request\" response from the server." }, { "name": "Bad Auth", "item": [ { "name": "credentials_issue:missing_auth", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 401\", function () {", " pm.response.to.have.status(401);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema401\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // noop", "}));", "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] } ], "auth": { "type": "noauth" }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Positive Testing", "item": [ { "name": "Duplicate Keys", "item": [ { "name": "credentials_issue.credential.issuer:dup", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 201\", function () {", " pm.response.to.have.status(201);", "});", "", "pm.test(\"response issuer matches request credential.issuer\", function() {", " const { issuer } = pm.response.json().verifiableCredential;", " pm.expect(issuer).to.equal(pm.variables.get(\"issuer\"))", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema201CredentialsIssue\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"credential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"issuer\": \"{{issuer}}-ignored\",\n \"issuer\": \"{{issuer}}\",\n \"issuanceDate\": \"{{issuanceDate}}\",\n \"credentialSubject\": {\"foo\": \"bar\"}\n },\n \"options\": {\n \"type\": \"Ed25519Signature2018\"\n }\n}", "options": { "raw": { "language": "text" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] } ] }, { "name": "credentials_issue", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 201\", function () {", " pm.response.to.have.status(201);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema201CredentialsIssue\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "pm.test(\"response issuer matches request credential.issuer\", function() {", " const { issuer } = pm.response.json().verifiableCredential;", " pm.expect(issuer).to.equal(pm.variables.get(\"issuer\"))", "});", "", "pm.test(\"response issuanceDate matches request credential.issuanceDate\", function() {", " const { issuanceDate } = pm.response.json().verifiableCredential;", " pm.expect(issuanceDate).to.equal(pm.variables.get(\"issuanceDate\"))", "});", "", "pm.test(\"response proof.created is close to 'now'\", function() {", " const { proof } = pm.response.json().verifiableCredential;", " const delta = Math.abs(Date.parse(proof.created) - Date.now());", " const tenSecondsInMs = 10000;", " pm.expect(delta).to.be.lessThan(tenSecondsInMs);", "});", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // noop", "}));", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential.opt.id", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 201\", function () {", " pm.response.to.have.status(201);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema201CredentialsIssue\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "pm.test(\"response verifiableCredential.id matches request credential.id\", function() {", " const { id } = pm.response.json().verifiableCredential.id;", " pm.expect(id).to.equal(pm.variables.get(\"id\"))", "});", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " req.credential.id = pm.variables.get(\"credentialId\");", "}));", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential:alt.issuer.object", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 201\", function () {", " pm.response.to.have.status(201);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema201CredentialsIssue\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "pm.test(\"response issuer matches request credential.issuer.id\", function() {", " const { issuer } = pm.response.json().verifiableCredential;", " // Implementations may reduce object with just \"id\" property to a bare string", " if (typeof issuer === 'string') {", " pm.expect(issuer).to.equal(pm.variables.get(\"issuer\"))", " } else {", " pm.expect(issuer.id).to.equal(pm.variables.get(\"issuer\"))", " }", "});", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.issuer can be an object with required 'id' element", " req.credential.issuer = {\"id\": pm.variables.get(\"issuer\") };", "}));", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:credential:alt.credentialSubject.object:opt.id", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 201\", function () {", " pm.response.to.have.status(201);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema201CredentialsIssue\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "pm.test(\"response credentialSubject.id matches request credential.credentialSubject.id\", function() {", " const { credentialSubject } = pm.response.json().verifiableCredential;", " pm.expect(credentialSubject.id).to.equal(pm.variables.get(\"credentialSubject\"))", "});", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credential.credentialSubject can be an object with optional 'id' element", " req.credential.credentialSubject = {\"id\": pm.variables.get(\"credentialSubject\") };", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options:opt.created", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 201\", function () {", " pm.response.to.have.status(201);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema201CredentialsIssue\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "pm.test(\"response proof.created matches request options.created\", function() {", " const { created } = pm.response.json().verifiableCredential.proof;", " pm.expect(created).to.equal(pm.variables.get(\"created\"))", "});", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " req.options.created = pm.variables.get(\"created\");", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] }, { "name": "credentials_issue:options:opt.credentialStatus", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 201\", function () {", " pm.response.to.have.status(201);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema201CredentialsIssue\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // options.credentialStatus can be an optional object", " req.options.credentialStatus = {\"type\": \"StatusList2021Entry\"};", "}));", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/vc+ld+json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/issue", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "issue" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] } ], "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{currentAccessToken}}", "type": "string" } ] }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "// Obtain an access token", "utils(pm).getAccessToken();", "", "// Some values are stored in variables so that they can be substituted", "// into the request body and so that the response body can be tested to", "// ensure it contains the same value.", "", "pm.variables.set(\"credentialId\", \"urn:uuid:{{$randomUUID}}\")", "pm.variables.set(\"credentialSubject\", \"did:example:123\")", "pm.variables.set(\"issuanceDate\", \"2006-01-02T15:04:05Z\");", "pm.variables.set(\"issuer\", pm.environment.get(\"ORGANIZATION_DID_WEB\"));", "pm.variables.set(\"created\", \"2006-01-02T15:04:05Z\");", "", "// Minimal request body should represent the minimum set of data required", "// to issue a valid credential. This should exclude all optional items, and", "// should contain the first alternate version of any 'oneOf' elements", "// defined in the OpenAPI schema.", "//", "// Tests will use this minimal request body as a starting point and will", "// mutate it as needed in pre-request scripts, e.g., to run tests using", "// alternate or optional elements.", "", "pm.variables.set(\"minimalRequestBody\", {", " \"credential\": {", " \"@context\": [", " \"https://www.w3.org/2018/credentials/v1\",", " \"https://w3id.org/traceability/v1\"", " ],", " \"type\": [", " \"VerifiableCredential\"", " ],", " \"issuer\": pm.variables.get(\"issuer\"),", " \"issuanceDate\": pm.variables.get(\"issuanceDate\"),", " \"credentialSubject\": {\"foo\": \"bar\"}", " },", " \"options\": {", " \"type\": \"Ed25519Signature2018\"", " }", "});", "", "mutateRequestBody = (mutationFunction) => {", " const req = pm.variables.get(\"minimalRequestBody\");", " mutationFunction(req);", " return JSON.stringify(req);", "};", "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Credentials - Update Status", "item": [ { "name": "Negative Testing", "item": [ { "name": "Bad Request", "item": [ { "name": "credentials_status:credentialId:missing", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialId is a required property", " delete req.credentialId;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialId:array", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialId must be string, not array", " req.credentialId = [pm.variables.get(\"credentialId\")];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialId:boolean", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialId must be string, not boolean", " req.credentialId = false;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialId:integer", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialId must be string, not integer", " req.credentialId = 42;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialId:null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialId must be string, not null", " req.credentialId = null;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialId:object", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialId must be string, not object", " req.credentialId = {};", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:missing", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus is a required property", " delete req.credentialStatus;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:boolean", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus must be array, not boolean", " req.credentialStatus = false;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:integer", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus must be array, not integer", " req.credentialStatus = 42;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus must be array, not null", " req.credentialStatus = null;", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:object", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus must be array, not object", " req.credentialStatus = {", " \"type\": \"StatusList2021Entry\",", " \"statusPurpose\": \"revocation\",", " \"status\": \"0\"", " };", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:string", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus must be array, not string", " req.credentialStatus = \"StatusList2021Entry\";", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:too_long", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus can only have zero or one elements.", " req.credentialStatus = [", " {", " \"type\": \"StatusList2021Entry\",", " \"statusPurpose\": \"revocation\",", " \"status\": \"0\",", " },", " {", " \"type\": \"StatusList2021Entry\",", " \"statusPurpose\": \"revocation\",", " \"status\": \"1\",", " }", " ];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:array", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus elements must be object, not array", " req.credentialStatus = [[]];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:boolean", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus elements must be object, not boolean", " req.credentialStatus = [false];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:integer", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus elements must be object, not integer", " req.credentialStatus = [42];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus elements must be object, not null", " req.credentialStatus = [null];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:string", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus elements must be object, not string", " req.credentialStatus = [\"StatusList2021Entry\"];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:type:missing", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus item type is a required property", " req.credentialStatus = [{", " \"status\": \"0\",", " }];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:type:array", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus item type must be string, not array", " req.credentialStatus = [{", " \"type\": [\"StatusList2021Entry\"],", " \"statusPurpose\": \"revocation\",", " \"status\": \"0\",", " }];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:type:boolean", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus item type must be string, not boolean", " req.credentialStatus = [{", " \"type\": false,", " \"status\": \"0\",", " }];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:type:integer", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus item type must be string, not integer", " req.credentialStatus = [{", " \"type\": 42,", " \"status\": \"0\",", " }];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:type:null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus item type must be string, not null", " req.credentialStatus = [{", " \"type\": null,", " \"status\": \"0\",", " }];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:type:object", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus item type must be string, not object", " req.credentialStatus = [{", " \"type\": {},", " \"status\": \"0\",", " }];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:type:invalid", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus item type must be a valid value", " req.credentialStatus = [{", " \"type\": \"invalid value\",", " \"status\": \"0\",", " }];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:status:missing", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus item status is a required property", " req.credentialStatus = [{", " \"type\": \"StatusList2021Entry\",", " \"purpose\": \"revocation\",", " }];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:status:array", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus item status must be string, not array", " req.credentialStatus = [{", " \"type\": \"StatusList2021Entry\",", " \"purpose\": \"revocation\",", " \"status\": [\"0\"],", " }];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:status:boolean", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus item status must be string, not boolean", " req.credentialStatus = [{", " \"type\": \"StatusList2021Entry\",", " \"purpose\": \"revocation\",", " \"status\": false,", " }];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:status:integer", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus item status must be string, not integer", " req.credentialStatus = [{", " \"type\": \"StatusList2021Entry\",", " \"purpose\": \"revocation\",", " \"status\": 1,", " }];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:status:null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus item status must be string, not null", " req.credentialStatus = [{", " \"type\": \"StatusList2021Entry\",", " \"purpose\": \"revocation\",", " \"status\": null,", " }];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:status:object", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus item status must be string, not object", " req.credentialStatus = [{", " \"type\": \"StatusList2021Entry\",", " \"purpose\": \"revocation\",", " \"status\": {},", " }];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:purpose:missing", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus item status is a required property", " req.credentialStatus = [{", " \"type\": \"StatusList2021Entry\",", " \"status\": \"1\",", " }];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:purpose:array", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus item status must be string, not array", " req.credentialStatus = [{", " \"type\": \"StatusList2021Entry\",", " \"purpose\": [\"revocation\"],", " \"status\": \"1\",", " }];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:purpose:boolean", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus item status must be string, not boolean", " req.credentialStatus = [{", " \"type\": \"StatusList2021Entry\",", " \"purpose\": false,", " \"status\": \"1\",", " }];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:purpose:integer", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus item status must be string, not integer", " req.credentialStatus = [{", " \"type\": \"StatusList2021Entry\",", " \"purpose\": 42,", " \"status\": \"1\",", " }];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:purpose:null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus item status must be string, not null", " req.credentialStatus = [{", " \"type\": \"StatusList2021Entry\",", " \"purpose\": null,", " \"status\": \"1\",", " }];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] }, { "name": "credentials_status:credentialStatus:item:purpose:object", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // credentialStatus item status must be string, not object", " req.credentialStatus = [{", " \"type\": \"StatusList2021Entry\",", " \"purpose\": {},", " \"status\": \"1\",", " }];", "}));" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] } ] }, { "name": "Bad Auth", "item": [ { "name": "credentials_status:missing_auth", "event": [ { "listen": "prerequest", "script": { "exec": [ "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // noop", "}));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 401\", function () {", " pm.response.to.have.status(401);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema401\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/status", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "status" ] } }, "response": [] } ], "auth": { "type": "noauth" }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] } ] } ], "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{currentAccessToken}}", "type": "string" } ] }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "// Obtain an access token", "utils(pm).getAccessToken();", "", "// Some values are stored in variables so that they can be substituted", "// into the request body and so that the response body can be tested to", "// ensure it contains the same value.", "", "pm.variables.set(\"credentialId\", \"urn:uuid:{{$randomUUID}}\")", "", "// Minimal request body should represent the minimum set of data required", "// to issue a valid credential. This should exclude all optional items, and", "// should contain the first alternate version of any 'oneOf' elements", "// defined in the OpenAPI schema.", "//", "// Tests will use this minimal request body as a starting point and will", "// mutate it as needed in pre-request scripts, e.g., to run tests using", "// alternate or optional elements.", "", "pm.variables.set(\"minimalRequestBody\", {", " \"credentialId\": pm.variables.get(\"credentialId\"),", " \"credentialStatus\": [],", "});", "", "mutateRequestBody = (mutationFunction) => {", " const req = pm.variables.get(\"minimalRequestBody\");", " mutationFunction(req);", " return JSON.stringify(req);", "};" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Credentials - Verify", "item": [ { "name": "Negative Testing", "item": [ { "name": "Bad Request", "item": [ { "name": "credentials_verify:vc:missing", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:string", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": \"string\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:null", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": null\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:integer", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": 123\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:boolean", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": true\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:array", "event": [ { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": []\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:@context:missing", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..V5PnQzCWxrPiCYT-WAyKAnypebgwYeD7lX_hyIjFa_lbJje23pZAfFdgnlqBnXLd19Ksa8fZpCE9TN7kAjzxDA\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:@context:boolean", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.@context must be an array of strings", "rawBody[\"@context\"] = true;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:@context:integer", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.@context must be an array of strings", "rawBody[\"@context\"] = 123;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:@context:null", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.@context must be an array of strings", "rawBody[\"@context\"] = null;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:@context:object", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": {\n \"@vocab\": \"https://www.w3.org/2018/credentials/v1/#\"\n },\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..w4xJhf2l_4JzwE4kp8pD8dNJdWSaws5HiBgal8zFzB6i9p05tmPITdsrUttpUwopW5UAq9M_EZVqlz-kRfSFBQ\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:@context:string", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": \"https://www.w3.org/2018/credentials/v1\",\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..z7SC-b7i7GCi9S_RgHGIkqzgeSxV5XUT_77JuHgqzQP-5KB5n_PrOW6ITnAlmgWyaVPSOD1IHVjb--avWDrbCQ\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:@context:item:array", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.@context must be an array of strings", "rawBody[\"@context\"] = [\"https://www.w3.org/2018/credentials/v1\", [\"array item\"]];", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:@context:item:boolean", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.@context must be an array of strings", "rawBody[\"@context\"] = [\"https://www.w3.org/2018/credentials/v1\", true];", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:@context:item:integer", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.@context must be an array of strings", "rawBody[\"@context\"] = [\"https://www.w3.org/2018/credentials/v1\", 123];", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:@context:item:null", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.@context must be an array of strings", "rawBody[\"@context\"] = [\"https://www.w3.org/2018/credentials/v1\", null];", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:@context:item:object", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n {\n \"@vocab\": \"https://www.w3.org/2018/credentials/v1/#\"\n }\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..z7SC-b7i7GCi9S_RgHGIkqzgeSxV5XUT_77JuHgqzQP-5KB5n_PrOW6ITnAlmgWyaVPSOD1IHVjb--avWDrbCQ\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:id:array", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": [\n \"urn:uuid:07aa969e-b40d-4c1b-ab46-ded252003ded\"\n ],\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..iom-sOLAz9-9FhadLRpqOYXXBhx4Rgwa3I3w1oh087xFQqIMhVTzcSpHCGdGWu2QT1KwrrgVAXPeTT2EthmxBg\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:id:boolean", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": false,\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..xftqB9cBFsSe226cWEZ4wr5sfxlAOJYYo6yjwPCVeHDdk6OoWGjZQGO7xXpSidrrr6e1imP18LiFK34xtRWADQ\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:id:integer", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": 123,\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..ZqV-qqLOh_Kb4vAdXKBfmFdNyv3FzXJAIYV9JltcYGDAefU3OUOnoaAU2WSEufkuYkvczxfRLhrMKgkoVoIRAA\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:id:null", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": null,\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..Csadnd3P2WqJLxAeXMkyx4nkvXvSEssOQriVuwYK0_6zyssqkkuAcKpkUFh8rf4J5JVpng9yvb_2263dLMLZCw\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:id:object", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": {\n \"key\": \"urn:uuid:07aa969e-b40d-4c1b-ab46-ded252003ded\"\n },\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..0Nrj_srTLYyA-9ZVA_dkVGjUcKx6xELHjbbdppEMFPGEN5c2gPXgstNRjnrr8hhMMegSAbvGASKWseBXGR9uAQ\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:type:missing", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..Bx6sv21fSmT7fCCxU3fDaLhEOhfRK8llXSiFTgApd4PHot00nVjhaKQyhBW9FfFmJljstlOV_Zff164cxOKiCQ\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:type:boolean", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.type must be an array of strings", "rawBody[\"type\"] = true;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:type:integer", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.type must be an array of strings", "rawBody[\"type\"] = 123;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:type:null", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.type must be an array of strings", "rawBody[\"type\"] = null;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:type:object", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.type must be an array of strings", "rawBody[\"type\"] = {\"key\": \"VerifiableCredential\"};", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:type:string", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": \"VerifiableCredential\",\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..z7SC-b7i7GCi9S_RgHGIkqzgeSxV5XUT_77JuHgqzQP-5KB5n_PrOW6ITnAlmgWyaVPSOD1IHVjb--avWDrbCQ\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:type:item:missing", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.type must have at least one element", "rawBody.type = [];", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:type:item:array", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.type must be an array of strings", "rawBody.type = [\"VerifiableCredential\", [\"array item\"]];", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:type:item:boolean", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.type must be an array of strings", "rawBody.type = [\"VerifiableCredential\", true];", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:type:item:integer", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.type must be an array of strings", "rawBody.type = [\"VerifiableCredential\", 123];", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:type:item:null", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.type must be an array of strings", "rawBody.type = [\"VerifiableCredential\", null];", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:type:item:object", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.type must be an array of strings", "rawBody.type = [\"VerifiableCredential\", {\"key\": \"VerifiableCredential\"}];", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:issuer:missing", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..JtG57INFa8ZuLTnouU9zbgh8jUf_red-a-75XviPrr3HsCFPhrMo6HltNwwb8d4-lftLfws1Bj0NVTYaTKpjBw\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:issuer:array", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": [\n \"did:example:123\"\n ],\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..Mdpb0nbZLuHLqh6IBr6ouahKZNFB-cIKJXn-b-O6Pt6HyJaECfc399qgMTWovf-l04XYEpuYDmfZeYVThBeMDg\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:issuer:boolean", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": false,\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..ryGzH1cVI0oyA0eBPKjIBDGJ8FYapvVnUEcovWWepoAASL3SzOOUvcQ9XOnQlclFU8dYhkEN2L8TQAj2OHlcBQ\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:issuer:integer", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": 123,\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..kEE8wQKYgVQlcBvJeVeV151aR_iD6vPrlW2bgXPW8NvJx9AOuW5eGtL3j_I3xIGR_JWDA5jGy6KDVkqJNEDHAw\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:issuer:null", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": null,\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..JtG57INFa8ZuLTnouU9zbgh8jUf_red-a-75XviPrr3HsCFPhrMo6HltNwwb8d4-lftLfws1Bj0NVTYaTKpjBw\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:issuer:id:missing", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": {},\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..3mHg7Xr443P-rcakew2CdGzjKXncUa4j2zY8A_W7U9tqPMFAiWuNqK5CTKV8yM_P3p5VZC8HMlc7SiaJYp-iBQ\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:issuer:id:array", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": {\n \"id\": [\n \"did:example:123\"\n ]\n },\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..TsN_31UJYzTTx1xh5CB9PjhnehJza3N5gAEFoNO55HLtQvoqGiEd-SI_4Xy7cpuYMbHdYf5CKHwP0eooyzjrAg\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:issuer:id:boolean", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": {\n \"id\": false\n },\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..JOl3FF8mG94K8DDAtSYeirCtE5GRVHXYZcIbf3JRCquZ7obaBm1wh3rEzbG-t8kjdWMn7Zwy8q4zw7pMC2-gAw\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:issuer:id:integer", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": {\n \"id\": 123\n },\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..Ibp_FWO5FwzfTfd_PeTgedqAEcbS7dtCOoREanyZP0yAg63ZGay4hjjd-NwZfmWG8LRbMSqtjX2_Cu5BbBEoAQ\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:issuer:id:null", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": {\n \"id\": null\n },\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..3mHg7Xr443P-rcakew2CdGzjKXncUa4j2zY8A_W7U9tqPMFAiWuNqK5CTKV8yM_P3p5VZC8HMlc7SiaJYp-iBQ\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:issuer:id:object", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": {\n \"id\": {\n \"key\": \"did:example:123\"\n }\n },\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..n3pFfPx4jY7EjlOpLNJT4CAJYI1roVE6LoUgLQhJ1bMgS5xUKbsIhynp7xDW-vSGzIcu58w-Z8_d9--99NCDBw\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:issuanceDate:missing", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..TM8P7mgJHcCjS_-L0AM_0QC1NSxVBcrUmv8bgZNoU-XF9F69wiOhogacbQFbewG5g7kf6mUvNA2Rv2SOHnjyCw\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:issuanceDate:array", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": [\n \"2010-01-01T19:23:24Z\"\n ],\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..eJGt2anEVhR3qXrd8726C2a8PNJ-S4SnhIUB2YpAUiLJhTQ4FcY_nONpl-U0MbpWgwlpJ7xa1_uk4EMrGmOUBg\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:issuanceDate:boolean", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": false,\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..8Ax_d8Yp8MIszSaGQa1WkiT4xktUk0Ltg7EF3QQ-GGY8JaV_jR6-zRUlEF2iW0HcK6C8ZoAt0KrllUUDdJkdDA\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:issuanceDate:integer", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": 123,\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..x-sSX9vqc6977YPFhNbzjKdisDv4qD2mx-yBSH_EG-UQCpyH_ErCzoFWnpJzRJKIKbOLEvvZ5SO_fWbNWyNdCQ\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:issuanceDate:null", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": null,\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..TM8P7mgJHcCjS_-L0AM_0QC1NSxVBcrUmv8bgZNoU-XF9F69wiOhogacbQFbewG5g7kf6mUvNA2Rv2SOHnjyCw\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:issuanceDate:object", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": {\n \"key\": \"2010-01-01T19:23:24Z\"\n },\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..Z1GVMKiJuJeJMpR_Ag4Wpv6940N3WUreYSxEsPaZgU_J1C_EDUj8ycRJitlJNEBBuGhibJ0GWyK-WW9RO2WCDA\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:issuanceDate:string", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"not a valid XML Date Time string\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..ebrsCszvH6TQHw1QhA8laajPRWL_zGvQ96Up8A4TiJrY7ueFm3V-Suk-KNd6JKckpOxLoF-Cb24KG_g73AqHAg\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:credentialSubject:missing", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..bHp5pm-9GUkKetjC75DopheXPgXztK_ruNFKStI2vt2pBbXHRJWZlO1PsXInyqfre9BcqmIUcwD4TbbjfiUYCw\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:credentialSubject:array", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": [\n \"did:example:123\"\n ],\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..z7SC-b7i7GCi9S_RgHGIkqzgeSxV5XUT_77JuHgqzQP-5KB5n_PrOW6ITnAlmgWyaVPSOD1IHVjb--avWDrbCQ\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:credentialSubject:boolean", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": false,\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..VK75R0RpQX9g4E_vGExhb_aDUNycy1UlQYvhCL1Ydl9bWiT1oUPeHEUgJMRGzmRRvyByyj13oHI2yB3cOLWXCA\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:credentialSubject:integer", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": 123,\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..dQnu8mT7YMECvDQPODQ1YUudQIO9Yx7WsZ07UWpHRqw0iV3ZvJOebbBoY0gFvsF9t6foFFEaaWcKi4vNgIdfCw\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:credentialSubject:null", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": null,\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..bHp5pm-9GUkKetjC75DopheXPgXztK_ruNFKStI2vt2pBbXHRJWZlO1PsXInyqfre9BcqmIUcwD4TbbjfiUYCw\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:credentialSubject:string", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": \"did:example:123\",\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..z7SC-b7i7GCi9S_RgHGIkqzgeSxV5XUT_77JuHgqzQP-5KB5n_PrOW6ITnAlmgWyaVPSOD1IHVjb--avWDrbCQ\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:credentialSubject:id:array", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": [\n \"did:example:123\"\n ]\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..8KJ136ciaI5X01UO8dPG0KMcsxmd7qzxvrahflTNqsrjjd-vF8bBKpjVDLOOj7bUolO277JWFCPX1xvvAVAvAg\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:credentialSubject:id:boolean", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": false\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..1Tatn2a45JYHHvhGvCLNbO1VUDV_lkvRVosGzDXDF-DseqRorDTFmY7XSyYqrl5yc6B200ET0RBvgK2vyEC6BA\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:credentialSubject:id:integer", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": 123\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..qPc7PrMuniibwI74A9ELPRd1YyUjNyeccnUFc4GCfj7I3oREDl0RT6PEt1pEY81mq7vlIsNG1myE86igC__qBA\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:credentialSubject:id:null", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": null\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..10vzNYPpxv6gZwVR-V23lgvIgseVOwxT6Tc1Zbn5T6pWGmUhrkur_O-OexNVjkVSf7Qu_6NDnIL1m0KcNKGBCg\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:vc:credentialSubject:id:object", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": {\n \"key\": \"did:example:123\"\n }\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..tQJMGZTsqt1RhpxKkq647EHc3pjQ183zd4KchfvD3dXWVfL9X1fUedMbj33l8eev6YWua2-6_4_sUTDr2MLEDg\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:missing", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof is required for embedded proof VCs", "delete rawBody.proof", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:array", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof is required to be an object for embedded proof VCs", "rawBody.proof = [];", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:boolean", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof is required to be an object for embedded proof VCs", "rawBody.proof = true;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:integer", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof is required to be an object for embedded proof VCs", "rawBody.proof = 10;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:null", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof is required to be an object for embedded proof VCs", "rawBody.proof = null;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:string", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof is required to be an object for embedded proof VCs", "rawBody.proof = \"string\";", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:type:missing", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.type is required for embedded proof VCs", "delete rawBody.proof.type", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:type:array", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.type is required to be a specific string", "rawBody.proof.type = [\"Ed25519Signature2018\"];", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:type:boolean", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.type is required to be a specific string", "rawBody.proof.type = true;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:type:integer", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.type is required to be a specific string", "rawBody.proof.type = 123;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:type:null", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.type is required to be a specific string", "rawBody.proof.type = null;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:type:object", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.type is required to be a specific string", "rawBody.proof.type = {\"key\": \"Ed25519Signature2018\"};", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:type:string", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.type is required to be a specific string", "rawBody.proof.type = \"not one of the valid values\";", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:created:array", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.created is required to be a string", "rawBody.proof.created = [\"2020-04-02T18:28:08Z\"];", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:created:boolean", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.created is required to be a string", "rawBody.proof.created = true;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:created:integer", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.created is required to be a string", "rawBody.proof.created = 123;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:created:null", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.created is required to be a string", "rawBody.proof.created = null;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:created:object", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.created is required to be a string", "rawBody.proof.created = {\"key\": \"2020-04-02T18:28:08Z\"};", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:verificationMethod:array", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.verificationMethod is required to be a string", "rawBody.proof.verificationMethod = [\"did:example:123#z6MksHh7qHWvybLg5QTPPdG2DgEjjduBDArV9EF9mRiRzMBN\"];", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:verificationMethod:boolean", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.verificationMethod is required to be a string", "rawBody.proof.verificationMethod = true;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:verificationMethod:integer", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.verificationMethod is required to be a string", "rawBody.proof.verificationMethod = 123;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:verificationMethod:null", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.verificationMethod is required to be a string", "rawBody.proof.verificationMethod = null;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:verificationMethod:object", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.verificationMethod is required to be a string", "rawBody.proof.verificationMethod = {\"key\": \"did:example:123#z6MksHh7qHWvybLg5QTPPdG2DgEjjduBDArV9EF9mRiRzMBN\"};", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:jws:array", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.jws is required to be a string", "rawBody.proof.jws = [\"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..YtqjEYnFENT7fNW-COD0HAACxeuQxPKAmp4nIl8jYAu__6IH2FpSxv81w-l5PvE1og50tS9tH8WyXMlXyo45CA\"];", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:jws:boolean", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.jws is required to be a string", "rawBody.proof.jws = true;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:jws:integer", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.jws is required to be a string", "rawBody.proof.jws = 123;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:jws:null", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.jws is required to be a string", "rawBody.proof.jws = null;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:jws:object", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.jws is required to be a string", "rawBody.proof.jws = {\"key\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..YtqjEYnFENT7fNW-COD0HAACxeuQxPKAmp4nIl8jYAu__6IH2FpSxv81w-l5PvE1og50tS9tH8WyXMlXyo45CA\"};", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:proofPurpose:array", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.proofPurpose is required to be the string \"assertionMethod\".", "rawBody.proof.proofPurpose = [\"assertionMethod\"];", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:proofPurpose:boolean", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.proofPurpose is required to be the string \"assertionMethod\".", "rawBody.proof.proofPurpose = true;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:proofPurpose:integer", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.proofPurpose is required to be the string \"assertionMethod\".", "rawBody.proof.proofPurpose = 123;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:proofPurpose:null", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.proofPurpose is required to be the string \"assertionMethod\".", "rawBody.proof.proofPurpose = null;", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:proofPurpose:object", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.proofPurpose is required to be the string \"assertionMethod\".", "rawBody.proof.proofPurpose = {\"key\": \"assertionMethod\"};", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:proof:proofPurpose:string", "event": [ { "listen": "prerequest", "script": { "exec": [ "let rawBody = pm.variables.get(\"valid_vc\");", "", "// credential.proof.proofPurpose is required to be the string \"assertionMethod\".", "rawBody.proof.proofPurpose = \"not a valid value\";", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(rawBody));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test(\"status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema400\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "" ] } } ] }, { "name": "Bad Auth", "item": [ { "name": "credentials_verify:missing_auth", "event": [ { "listen": "prerequest", "script": { "exec": [ "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", JSON.stringify(pm.variables.get(\"valid_vc\")));" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 401\", function () {", " pm.response.to.have.status(401);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema401\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {{requestBody}}\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] } ], "auth": { "type": "noauth" }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Bad Signature", "item": [ { "name": "credentials_verify:bad_signature", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema200CredentialsVerify\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "pm.test(\"response verified is false\", function() {", " const { verified } = pm.response.json();", " pm.expect(verified).to.be.false;", "});" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"id\": \"urn:uuid:e22ccc92-2c81-411f-a80f-e7f8334000a7\",\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..mvbcalofPOi7o7nxByyxXCuSOKXuGFM7_W9a8N62-EERarrH4p4T_0c2ZfGnGLiHOvY6Q-dyy38t9HPvXy-MBg\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] } ] } ] }, { "name": "Positive Testing", "item": [ { "name": "credentials_verify", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema200CredentialsVerify\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "pm.test(\"response verified is true\", function() {", " const { verified } = pm.response.json();", " pm.expect(verified).to.be.true;", "});" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..z7SC-b7i7GCi9S_RgHGIkqzgeSxV5XUT_77JuHgqzQP-5KB5n_PrOW6ITnAlmgWyaVPSOD1IHVjb--avWDrbCQ\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] }, { "name": "credentials_verify:issuer:object", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema200CredentialsVerify\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "", "pm.test(\"response verified is true\", function() {", " const { verified } = pm.response.json();", " pm.expect(verified).to.be.true;", "});" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"verifiableCredential\": {\n \"@context\": [\n \"https://www.w3.org/2018/credentials/v1\",\n \"https://w3id.org/traceability/v1\"\n ],\n \"credentialSubject\": {\n \"id\": \"did:example:123\"\n },\n \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",\n \"issuanceDate\": \"2006-01-02T15:04:05Z\",\n \"issuer\": {\n \"id\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\"\n },\n \"type\": [\n \"VerifiableCredential\"\n ],\n \"proof\": {\n \"created\": \"2006-01-02T15:04:05Z\",\n \"verificationMethod\": \"did:key:z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn#z6MkgVHZNqLBqoQAoGxRiSJP5gLgVEDCJJzT5ZsGEabKtfyn\",\n \"proofPurpose\": \"assertionMethod\",\n \"type\": \"Ed25519Signature2018\",\n \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..z7SC-b7i7GCi9S_RgHGIkqzgeSxV5XUT_77JuHgqzQP-5KB5n_PrOW6ITnAlmgWyaVPSOD1IHVjb--avWDrbCQ\"\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{API_BASE_URL}}/credentials/verify", "host": [ "{{API_BASE_URL}}" ], "path": [ "credentials", "verify" ] } }, "response": [] } ] } ], "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{currentAccessToken}}", "type": "string" } ] }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "// Obtain an access token", "utils(pm).getAccessToken();", "", "// Dummy VC issued for testing", "pm.variables.set(\"valid_vc\", {", " \"@context\": [", " \"https://www.w3.org/2018/credentials/v1\"", " ],", " \"credentialSubject\": {", " \"id\": \"did:example:123\"", " },", " \"id\": \"urn:uuid:57016a7f-0e4c-4be9-beec-cf39c4dd459a\",", " \"issuanceDate\": \"2006-01-02T15:04:05Z\",", " \"issuer\": \"did:key:z6Mkf5p6p73kd57TRr2zWC1NuMUt3SjtYNANn9qjYXZPAYJV\",", " \"proof\": {", " \"created\": \"2020-04-02T18:48:36Z\",", " \"jws\": \"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..R618vVfGIF2jTe5dVkzMqQYIFKoIkyK_3_35z15tp_aFzew_4ruQt2DcaxdtkwsRff7bFsrVfigTl_XeE3tPDA\",", " \"proofPurpose\": \"assertionMethod\",", " \"type\": \"Ed25519Signature2018\",", " \"verificationMethod\": \"did:key:z6Mkf5p6p73kd57TRr2zWC1NuMUt3SjtYNANn9qjYXZPAYJV#z6Mkf5p6p73kd57TRr2zWC1NuMUt3SjtYNANn9qjYXZPAYJV\"", " },", " \"type\": \"VerifiableCredential\"", "});", "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Presentations - Present", "item": [ { "name": "Negative Testing", "item": [ { "name": "Bad Auth", "item": [ { "name": "presentations:missing_auth", "event": [ { "listen": "prerequest", "script": { "exec": [ "// Get multi-tenant aware presentations base URL from cached did:web document", "const didDoc = pm.variables.get(\"currentDidWeb\");", "const service = didDoc.service.find((s) => s.type.includes('TraceabilityAPI'));", "pm.variables.set(\"presentations_base_url\", service.serviceEndpoint);", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 401\", function () {", " pm.response.to.have.status(401);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema401\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "url": { "raw": "{{presentations_base_url}}/presentations", "host": [ "{{presentations_base_url}}" ], "path": [ "presentations" ] } }, "response": [] } ], "auth": { "type": "noauth" }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] } ] } ], "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{currentAccessToken}}", "type": "string" } ] }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "// Obtain an access token", "utils(pm).getAccessToken();", "", "// Presentations requires a multi-tenant aware presentation endpoint. This", "// fires off an async sendRequest() that Postman will wait for before running", "// any requests in the collection.", "utils(pm).populateCurrentDidWeb(pm.environment.get(\"ORGANIZATION_DID_WEB\"));", "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Presentations - Create", "item": [ { "name": "Negative Testing", "item": [ { "name": "Bad Auth", "item": [ { "name": "presentations_prove:missing_auth", "event": [ { "listen": "prerequest", "script": { "exec": [ "// Get multi-tenant aware presentations base URL from cached did:web document", "const didDoc = pm.variables.get(\"currentDidWeb\");", "const service = didDoc.service.find((s) => s.type.includes('TraceabilityAPI'));", "pm.variables.set(\"presentations_base_url\", service.serviceEndpoint);", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // noop", "}));", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 401\", function () {", " pm.response.to.have.status(401);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema401\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{presentations_base_url}}/presentations/prove", "host": [ "{{presentations_base_url}}" ], "path": [ "presentations", "prove" ] } }, "response": [] } ], "auth": { "type": "noauth" }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] } ] } ], "auth": { "type": "bearer" }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "// Obtain an access token", "utils(pm).getAccessToken();", "", "", "// Presentations requires a multi-tenant aware presentation endpoint. This", "// fires off an async sendRequest() that Postman will wait for before running", "// any requests in the collection.", "utils(pm).populateCurrentDidWeb(pm.environment.get(\"ORGANIZATION_DID_WEB\"));", "", "// Minimal request body should represent the minimum set of data required", "// for a successful request. This should exclude all optional items, and", "// should contain the first alternate version of any 'oneOf' elements", "// defined in the OpenAPI schema.", "//", "// Tests will use this minimal request body as a starting point and will", "// mutate it as needed in pre-request scripts, e.g., to run tests using", "// alternate or optional elements.", "", "pm.variables.set(\"minimalRequestBody\", {", "});", "", "mutateRequestBody = (mutationFunction) => {", " const req = pm.variables.get(\"minimalRequestBody\");", " mutationFunction(req);", " return JSON.stringify(req);", "};" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Presentations - Verify", "item": [ { "name": "Negative Testing", "item": [ { "name": "Bad Auth", "item": [ { "name": "presentations_verify:missing_auth", "event": [ { "listen": "prerequest", "script": { "exec": [ "// Get multi-tenant aware presentations base URL from cached did:web document", "const didDoc = pm.variables.get(\"currentDidWeb\");", "const service = didDoc.service.find((s) => s.type.includes('TraceabilityAPI'));", "pm.variables.set(\"presentations_base_url\", service.serviceEndpoint);", "", "// Request body must be serialized before sending over the wire.", "pm.variables.set(\"requestBody\", mutateRequestBody((req) => {", " // noop", "}));", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"status code is 401\", function () {", " pm.response.to.have.status(401);", "});", "", "pm.test(\"response validates against schema\", function() {", " const schemaString = pm.collectionVariables.get(\"responseSchema401\");", " pm.response.to.have.jsonSchema(JSON.parse(schemaString));", "});", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{{requestBody}}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{presentations_base_url}}/presentations/verify", "host": [ "{{presentations_base_url}}" ], "path": [ "presentations", "verify" ] } }, "response": [] } ], "auth": { "type": "noauth" }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] } ] } ], "auth": { "type": "bearer" }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "// Obtain an access token", "utils(pm).getAccessToken();", "", "", "// Presentations requires a multi-tenant aware presentation endpoint. This", "// fires off an async sendRequest() that Postman will wait for before running", "// any requests in the collection.", "utils(pm).populateCurrentDidWeb(pm.environment.get(\"ORGANIZATION_DID_WEB\"));", "", "// Minimal request body should represent the minimum set of data required", "// for a successful request. This should exclude all optional items, and", "// should contain the first alternate version of any 'oneOf' elements", "// defined in the OpenAPI schema.", "//", "// Tests will use this minimal request body as a starting point and will", "// mutate it as needed in pre-request scripts, e.g., to run tests using", "// alternate or optional elements.", "", "pm.variables.set(\"minimalRequestBody\", {", "});", "", "mutateRequestBody = (mutationFunction) => {", " const req = pm.variables.get(\"minimalRequestBody\");", " mutationFunction(req);", " return JSON.stringify(req);", "};" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Presentations - Notify", "item": [], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "// Presentations requires a multi-tenant aware presentation endpoint. This", "// fires off an async sendRequest() that Postman will wait for before running", "// any requests in the collection.", "utils(pm).populateCurrentDidWeb(pm.environment.get(\"ORGANIZATION_DID_WEB\"));", "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Presentations - Submit", "item": [], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "// Presentations requires a multi-tenant aware presentation endpoint. This", "// fires off an async sendRequest() that Postman will wait for before running", "// any requests in the collection.", "utils(pm).populateCurrentDidWeb(pm.environment.get(\"ORGANIZATION_DID_WEB\"));", "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "pm.request.headers.add({key: 'User-Agent', value: 'W3C Traceability Conformance Tests'});", "// hydrateCache retrieves a cache from global scope. Caches are stored", "// in global scope so that they will persist across requests.", "const hydrateCache = (cacheName) => {", " if (!pm.globals.has(cacheName)) {", " return {};", " }", " try {", " const cache = pm.globals.get(cacheName);", " return JSON.parse(cache)", " } catch(e) {", " console.warn(`ignoring invalid cache \"${cacheName}\"`);", " }", " return {}", "}", "", "const tokenCache = hydrateCache(\"tokenCache\");", "const didWebCache = hydrateCache(\"didWebCache\");", "", "// convertDidWebToEndpoint produces a URL to the DID document for a given", "// `did:web` DID.", "const convertDidWebToEndpoint = (did) => {", " const re = /did:web:(?[a-zA-Z0-9/.\\-_]+)(?:%3[aA](?[0-9]+))?(?:[a-zA-Z0-9/.:\\-_]+)?/", " const match = did.match(re);", " if (!match) {", " throw new Error('DID is not a valid did:web');", " }", " const { host, port, path } = match.groups;", " const hostport = port ? `${host}:${port}` : `${host}`", " const pathname = path?.split(':').join('/') || '/.well-known';", " return `https://${hostport}${pathname}/did.json`;", "};", "", "// The pm variable is not available inside global methods.", "utils = (pm) => {", "", " // NB: The main Postman request will not be sent until the pre-request script", " // is determined to be finished with all callbacks, including sendRequest.", "", " return {", " convertDidWebToEndpoint,", " populateCurrentDidWeb: (did) => {", " if (didWebCache[did]) {", " pm.variables.set(\"currentDidWeb\", didWebCache[did]);", " return;", " }", " const didWebRequest = {", " url: convertDidWebToEndpoint(did),", " method: 'GET',", " };", " pm.sendRequest(didWebRequest, (err, res) => {", " pm.expect(err).to.be.null;", " didWebCache[did] = res.json();", " pm.globals.set(\"didWebCache\", JSON.stringify(didWebCache));", " pm.variables.set(\"currentDidWeb\", didWebCache[did]);", " });", " },", " getAccessToken: () => {", " // Historically, multiple tokens were keyed by scope.", " const cacheKey = \"default\";", " if (tokenCache[cacheKey]) {", " pm.variables.set('currentAccessToken', tokenCache[cacheKey]);", " return;", " }", " const accessTokenRequest = {", " url: pm.environment.get(\"TOKEN_ENDPOINT\"),", " method: 'POST',", " body: {", " mode: 'urlencoded',", " urlencoded: [", " {key: \"client_id\", value: pm.environment.get(\"CLIENT_ID\")},", " {key: \"client_secret\", value: pm.environment.get(\"CLIENT_SECRET\")},", " {key: \"audience\", value: pm.environment.get(\"TOKEN_AUDIENCE\")},", " {key: \"grant_type\", value: \"client_credentials\" },", " {key: \"scope\", value: pm.environment.get(\"CLIENT_SCOPE\")},", " ],", " }", " };", " pm.sendRequest(accessTokenRequest, (err, res) => {", " pm.expect(err).to.be.null;", " tokenCache[cacheKey] = res.json().access_token;", " pm.globals.set(\"tokenCache\", JSON.stringify(tokenCache));", " pm.variables.set(\"currentAccessToken\", tokenCache[cacheKey]);", " });", " },", " };", "};" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ], "variable": [ { "key": "responseSchema201CredentialsIssue", "value": "{\"type\":\"object\",\"required\":[\"verifiableCredential\"],\"properties\":{\"verifiableCredential\":{\"title\":\"Serialized Verifiable Credential\",\"oneOf\":[{\"allOf\":[{\"title\":\"Verifiable Credential\",\"type\":\"object\",\"allOf\":[{\"type\":\"object\",\"required\":[\"@context\",\"type\",\"issuer\",\"issuanceDate\",\"credentialSubject\"],\"properties\":{\"@context\":{\"description\":\"The JSON-LD Context defining all terms in the Credential. This array\\nSHOULD contain \\\"https://w3id.org/traceability/v1\\\".\\n\",\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"id\":{\"description\":\"The IRI identifying the Credential\",\"type\":\"string\"},\"type\":{\"description\":\"The Type of the Credential\",\"type\":\"array\",\"items\":{\"type\":\"string\"},\"minItems\":1},\"issuer\":{\"description\":\"This value MUST match the assertionMethod used to create the Verifiable Credential.\",\"oneOf\":[{\"type\":\"string\"},{\"type\":\"object\",\"required\":[\"id\"],\"properties\":{\"id\":{\"description\":\"The IRI identifying the Issuer\",\"type\":\"string\"}}}]},\"issuanceDate\":{\"description\":\"This value MUST be an XML Date Time String\",\"type\":\"string\"},\"credentialSubject\":{\"type\":\"object\",\"properties\":{\"id\":{\"description\":\"The IRI identifying the Subject\",\"type\":\"string\"}}}}},{\"type\":\"object\"}]},{\"type\":\"object\",\"required\":[\"id\"]}]},{\"title\":\"VC JWT\",\"type\":\"string\"}]}}}", "type": "string" }, { "key": "responseSchema400", "value": "{\"type\":\"object\",\"required\":[\"message\"],\"properties\":{\"message\":{\"type\":\"string\"},\"details\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}},{\"type\":\"object\",\"additionalProperties\":true}]}}}", "type": "string" }, { "key": "responseSchema401", "value": "{\"type\":\"object\",\"required\":[\"message\"],\"properties\":{\"message\":{\"type\":\"string\"},\"details\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}},{\"type\":\"object\",\"additionalProperties\":true}]}}}", "type": "string" }, { "key": "responseSchema403", "value": "{\"type\":\"object\",\"required\":[\"message\"],\"properties\":{\"message\":{\"type\":\"string\"},\"details\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}},{\"type\":\"object\",\"additionalProperties\":true}]}}}", "type": "string" }, { "key": "responseSchema404", "value": "{\"type\":\"object\",\"required\":[\"message\"],\"properties\":{\"message\":{\"type\":\"string\"},\"details\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}},{\"type\":\"object\",\"additionalProperties\":true}]}}}", "type": "string" }, { "key": "responseSchema500", "value": "{\"type\":\"object\",\"required\":[\"message\"],\"properties\":{\"message\":{\"type\":\"string\"},\"details\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}},{\"type\":\"object\",\"additionalProperties\":true}]}}}", "type": "string" }, { "key": "responseSchema200Identifiers", "value": "{\"type\":\"object\",\"required\":[\"didDocument\"],\"properties\":{\"didDocument\":{\"type\":\"object\",\"required\":[\"service\"],\"properties\":{\"service\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"type\":\"object\",\"required\":[\"type\",\"serviceEndpoint\"],\"properties\":{\"type\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}}]},\"serviceEndpoint\":{\"type\":\"string\"}}}}}},\"didResolutionMetadata\":{\"type\":\"object\"},\"didDocumentMetadata\":{\"type\":\"object\"}}}", "type": "string" }, { "key": "responseSchema400Identifiers", "value": "{\"description\":\"ErrInvalidDID is returned when the request path contains an invalid DID\\nparameter.\\n\",\"type\":\"object\",\"required\":[\"message\"],\"properties\":{\"message\":{\"type\":\"string\"},\"details\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}},{\"type\":\"object\",\"additionalProperties\":true}]}}}", "type": "string" }, { "key": "responseSchema200ApiConfiguration", "value": "{\"title\":\"Traceability API DID Web Document\",\"type\":\"object\",\"properties\":{\"@context\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"uniqueItems\":true,\"items\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"object\"}]}}]},\"id\":{\"type\":\"string\"},\"service\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"},\"type\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"serviceEndpoint\":{\"type\":\"string\"}}}}}}", "type": "string" }, { "key": "responseSchema200CredentialsVerify", "value": "{\"title\":\"Verification Result\",\"type\":\"object\",\"properties\":{\"verified\":{\"type\":\"boolean\"}},\"required\":[\"verified\"],\"additionalProperties\":true}", "type": "string" }, { "key": "responseSchema422CredentialsIssue", "value": "{\"description\":\"ErrUnknownIssuer is returned when the implementation does not have private\\nkey material for the requested `issuer`, and is therefore unable to issue\\nthe requested credential.\\n\",\"type\":\"object\",\"required\":[\"message\"],\"properties\":{\"message\":{\"type\":\"string\"},\"details\":{\"oneOf\":[{\"type\":\"string\"},{\"type\":\"array\",\"items\":{\"type\":\"string\"}},{\"type\":\"object\",\"additionalProperties\":true}]}}}", "type": "string" } ] }