Solid Wallet Collection.postman_collection.json
{
"info": {
"_postman_id": "30c6fad0-3892-4123-8b30-fde297c90e83",
"name": "Solid Wallet Collection",
"description": "This collection is intended to show how the Solid Wallet API works. It also demonstrates the multiple scenarios in which the wallet could interact with another agent (a possible companion application) to obtain the right level of consent for the wallet data.\n\nThis Postman collection requires a specific order of execution due to dependencies between requests. Variables set in earlier requests may be used as inputs for subsequent requests, creating a chain of dependencies.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "20774119"
},
"item": [
{
"name": "Authentication",
"item": [
{
"name": "Home Copy",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function() {",
" pm.response.to.have.status(200)",
"})",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "noauth"
},
"method": "GET",
"header": [],
"url": {
"raw": "{{openid}}",
"host": ["{{openid}}"]
}
},
"response": []
},
{
"name": "Discovery Copy",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = pm.response.json();",
"",
"pm.test(\"Status code is 200\", function() {",
" pm.response.to.have.status(200)",
"})",
"",
"pm.test(\"Check discovery of JWK uri\", function() {",
" pm.expect(jsonData.jwks_uri).not.empty.string;",
"})",
"",
"pm.test(\"Check discovery of registration endpoint\", function() {",
" pm.expect(jsonData.registration_endpoint).not.empty.string;",
" pm.environment.set(\"openid.registration.endpoint\", jsonData.registration_endpoint);",
"})",
"",
"pm.test(\"Check discovery of authorization endpoint\", function() {",
" pm.expect(jsonData.authorization_endpoint).not.empty.string;",
" pm.environment.set(\"openid.authorization.endpoint\", jsonData.authorization_endpoint);",
"})",
"",
"pm.test(\"Check discovery of token endpoint\", function() {",
" pm.expect(jsonData.token_endpoint).not.empty.string;",
" pm.environment.set(\"openid.token.endpoint\", jsonData.token_endpoint);",
"})",
"",
"pm.test(\"Check discovery of logout endpoint\", function() {",
" pm.expect(jsonData.end_session_endpoint).not.empty.string;",
" pm.environment.set(\"openid.logout.endpoint\", jsonData.end_session_endpoint);",
"})",
"",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "noauth"
},
"method": "GET",
"header": [],
"url": {
"raw": "{{openid}}/.well-known/openid-configuration",
"host": ["{{openid}}"],
"path": [".well-known", "openid-configuration"]
}
},
"response": []
},
{
"name": "Create access token from client credential for agent1",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function() {",
" pm.response.to.have.status(200)",
"})",
"",
"var jsonData = JSON.parse(responseBody);",
"pm.collectionVariables.set(\"walletAccessToken\", jsonData.access_token);",
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "username",
"value": "{{agent1.client_id}}",
"type": "string"
},
{
"key": "password",
"value": "{{agent1.client_secret}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "User-Agent",
"value": "{{user.agent}}"
},
{
"key": "traceparent",
"value": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
},
{
"key": "x-request-id",
"value": "%22%2C%22somekey%22%3A%20%22somevalue%22%2C",
"disabled": true
},
{
"key": "baggage",
"value": "x-request-id=abc",
"disabled": true
},
{
"key": "x-correlation-id",
"value": "123\\t\\texample.com"
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "grant_type",
"value": "client_credentials",
"type": "text"
},
{
"key": "scope",
"value": "openid webid",
"type": "text"
}
]
},
"url": {
"raw": "{{openid.token.endpoint}}",
"host": ["{{openid.token.endpoint}}"]
}
},
"response": []
},
{
"name": "Create access token from client credential for demoApp",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function() {",
" pm.response.to.have.status(200)",
"})",
"",
"var jsonData = JSON.parse(responseBody);",
"pm.collectionVariables.set(\"companionAppAccessToken\", jsonData.access_token);",
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "{{agent2.client_secret}}",
"type": "string"
},
{
"key": "username",
"value": "{{agent2.client_id}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "User-Agent",
"value": "{{user.agent}}"
},
{
"key": "traceparent",
"value": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
},
{
"key": "x-request-id",
"value": "%22%2C%22somekey%22%3A%20%22somevalue%22%2C",
"disabled": true
},
{
"key": "baggage",
"value": "x-request-id=abc",
"disabled": true
},
{
"key": "x-correlation-id",
"value": "123\\t\\texample.com"
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "grant_type",
"value": "client_credentials",
"type": "text"
},
{
"key": "scope",
"value": "openid webid",
"type": "text"
}
]
},
"url": {
"raw": "{{openid.token.endpoint}}",
"host": ["{{openid.token.endpoint}}"]
}
},
"response": []
},
{
"name": "Check login info",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{walletAccessToken}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "{{wallet_api}}/login/userInfo",
"host": ["{{wallet_api}}"],
"path": ["login", "userInfo"]
}
},
"response": []
},
{
"name": "Check login",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{walletAccessToken}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "{{wallet_api}}/login/success",
"host": ["{{wallet_api}}"],
"path": ["login", "success"]
}
},
"response": []
}
],
"description": "This collection is used to discover the broker endpoint. It makes two POST to be able to authenticate with a wallet and a possible companion app for consent interactions."
},
{
"name": "Wallet CRUD Collection",
"item": [
{
"name": "List Wallet Items",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function() {",
" pm.response.to.have.status(200)",
"})",
""
],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "prerequest",
"script": {
"exec": [""],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"disableBodyPruning": true,
"disabledSystemHeaders": {}
},
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{walletAccessToken}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": []
},
"url": {
"raw": "{{wallet_api}}/wallet",
"host": ["{{wallet_api}}"],
"path": ["wallet"]
}
},
"response": []
},
{
"name": "Upload a json file",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.collectionVariables.set(\"wallet.resource.file.name\", \"filename.json\");"
],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "prerequest",
"script": {
"exec": [""],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{walletAccessToken}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "file",
"type": "file",
"src": "postman-cloud:///1ef7b473-e069-4d10-a877-4c915f0086dc"
},
{
"key": "fileName",
"value": "filename.json",
"type": "text"
},
{
"key": "contentType",
"value": "application/json",
"type": "text"
}
]
},
"url": {
"raw": "{{wallet_api}}/wallet",
"host": ["{{wallet_api}}"],
"path": ["wallet"]
}
},
"response": []
},
{
"name": "Get wallet resource",
"event": [
{
"listen": "test",
"script": {
"exec": [""],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{accessToken}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "{{wallet_api}}/wallet/{{wallet.resource.file.name}}",
"host": ["{{wallet_api}}"],
"path": ["wallet", "{{wallet.resource.file.name}}"]
}
},
"response": []
},
{
"name": "Delete wallet resource",
"event": [
{
"listen": "test",
"script": {
"exec": [""],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{walletAccessToken}}",
"type": "string"
}
]
},
"method": "DELETE",
"header": [],
"url": {
"raw": "{{wallet_api}}/wallet/{{wallet.resource.file.name}}",
"host": ["{{wallet_api}}"],
"path": ["wallet", "{{wallet.resource.file.name}}"]
}
},
"response": []
}
],
"description": "This collection uses the wallet API to GET, PUT, and DELETE resources from a user's Wallet. PUT requests can be used to upload both JSON files and other file types by utilizing multipart/form-data encoding.\n\nFeatures are listed here: [https://docs.inrupt.com/data-wallet/features/#](https://docs.inrupt.com/data-wallet/features/#)",
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [""]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [""]
}
}
]
},
{
"name": "Flow: Save a Credential to your Wallet",
"item": [
{
"name": "Get Credential",
"event": [
{
"listen": "test",
"script": {
"exec": [
"",
"var jsonData = pm.response.json();",
"",
"pm.environment.set(\"pm.variable.public_credential\", jsonData);",
"",
""
],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "prerequest",
"script": {
"exec": [""],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{public_credential}}",
"host": ["{{public_credential}}"]
}
},
"response": []
},
{
"name": "Save a Credential to the Wallet",
"event": [
{
"listen": "test",
"script": {
"exec": [""],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "prerequest",
"script": {
"exec": [""],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{walletAccessToken}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "filename",
"value": "Public Credential",
"type": "text"
},
{
"key": "file",
"value": "publicCredential.json",
"type": "text"
}
]
},
"url": {
"raw": "{{wallet_api}}/wallet",
"host": ["{{wallet_api}}"],
"path": ["wallet"]
}
},
"response": []
}
],
"description": "Documentation can be found in the following link:\n\n[https://docs.inrupt.com/data-wallet/patterns-and-flows/#download-a-resource-into-the-wallet](https://docs.inrupt.com/data-wallet/patterns-and-flows/#download-a-resource-into-the-wallet)"
},
{
"name": "Flow: Share a Resource with Companion Demo App",
"item": [
{
"name": "CompanionAppRequestAccess",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [""],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 201\", function() {",
" pm.response.to.have.status(201)",
"})",
"",
"pm.test(\"Discover created VC URI\", function() {",
" var vcUrl = pm.response.headers.get(\"Location\")",
" pm.expect(vcUrl).not.empty.string;",
" pm.collectionVariables.set(\"vc.uri\", vcUrl);",
"})",
"",
"",
"var jsonData = pm.response.json();",
"",
"pm.test(\"Discover proof endpoint\", function() {",
" pm.expect(jsonData.proof.verificationMethod).not.empty.string;",
" pm.collectionVariables.set(\"vc.proof.uri\", jsonData.proof.verificationMethod);",
"})",
"",
"",
"pm.test(\"Discover status URI\", function() {",
" pm.expect(jsonData.credentialStatus.id).not.empty.string;",
" pm.collectionVariables.set(\"vc.status.uri\", jsonData.credentialStatus.id);",
"})",
"",
"pm.collectionVariables.set(\"vc.body\", responseBody);",
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{companionAppAccessToken}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"credential\": {\n \"@context\": [\"https://www.w3.org/2018/credentials/v1\", \"https://schema.inrupt.com/credentials/v1.jsonld\" ],\n \"type\": [\"VerifiableCredential\"],\n \"credentialSubject\": {\n \"hasConsent\": [{\n \"mode\":[\"http://www.w3.org/ns/auth/acl#Read\"],\n \"forPersonalData\": [\n \"{{resource_to_share}}\"\n ],\n \"isConsentForDataSubject\": \"{{webid_wallet}}\",\n \"hasStatus\":\"https://w3id.org/GConsent#ConsentStatusRequested\",\n \"forPurpose\":\"https://example.com/SpecificPurpose\"\n }]\n }\n }\n}"
},
"url": {
"raw": "{{vc}}/issue",
"host": ["{{vc}}"],
"path": ["issue"]
}
},
"response": []
},
{
"name": "Send AR to inbox",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"var vp = \"{\\\"@context\\\": [ \\\"https://www.w3.org/2018/credentials/v1\\\" ], \\\"type\\\": \\\"VerifiablePresentation\\\", \\\"verifiableCredential\\\": [\" + pm.collectionVariables.get(\"vc.body\") + \" ]}\"",
"",
"pm.collectionVariables.set(\"vp\", vp);",
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{companionAppAccessToken}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{{vp}}\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{pod}}/inbox/",
"host": ["{{pod}}"],
"path": ["inbox", ""]
}
},
"response": []
},
{
"name": "Get List ARs from Inbox",
"event": [
{
"listen": "test",
"script": {
"exec": [
"",
"pm.test(\"Status code is 200\", function() {",
" pm.response.to.have.status(200)",
"})",
"",
"var jsonData = pm.response.json();",
"if (jsonData.length > 0) {",
" pm.collectionVariables.set(\"wallet.access.request.id\", jsonData[0].uuid);",
"}"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{walletAccessToken}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "{{wallet_api}}/inbox",
"host": ["{{wallet_api}}"],
"path": ["inbox"]
}
},
"response": []
},
{
"name": "Accept Access Request",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{walletAccessToken}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [],
"url": {
"raw": "{{wallet_api}}/inbox/{{wallet.access.request.id}}/grantAccess",
"host": ["{{wallet_api}}"],
"path": ["inbox", "{{wallet.access.request.id}}", "grantAccess"]
}
},
"response": []
},
{
"name": "List Access Grants",
"event": [
{
"listen": "test",
"script": {
"exec": [
"",
"pm.test(\"Status code is 200\", function() {",
" pm.response.to.have.status(200)",
"})",
"",
"var jsonData = pm.response.json();",
"if (jsonData.length > 0) {",
" pm.collectionVariables.set(\"wallet.access.grant.id\", jsonData[0].uuid);",
"}"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{walletAccessToken}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "{{wallet_api}}/accessgrants",
"host": ["{{wallet_api}}"],
"path": ["accessgrants"]
}
},
"response": []
},
{
"name": "Get Access Grant",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function() {",
" pm.response.to.have.status(200)",
"})",
"",
"var jsonData = pm.response.json();",
"",
"pm.test(\"Discover status URI\", function() {",
" pm.expect(jsonData.credentialStatus.id).not.empty.string;",
" pm.collectionVariables.set(\"vc.status.uri\", jsonData.credentialStatus.id);",
"})",
"pm.test(\"Discover created VC URI\", function() {",
" pm.collectionVariables.set(\"vp\", responseBody);",
"})",
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{accessToken}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "{{wallet_api}}/accessgrants/{{wallet.access.grant.id}}",
"host": ["{{wallet_api}}"],
"path": ["accessgrants", "{{wallet.access.grant.id}}"]
}
},
"response": []
}
],
"description": "Documentation can be found in the following link:\n\n[https://docs.inrupt.com/data-wallet/patterns-and-flows/#share-a-resource-with-a-third-party-application](https://docs.inrupt.com/data-wallet/patterns-and-flows/#share-a-resource-with-a-third-party-application)\n\nThe companion app (agent_2) will request data from the wallet. The companion app will send that request to the wallet inbox.\n\nWallet will get information on their request inbox.\n\nWallet user to accept or denied request."
},
{
"name": "Flow: Share Identity to Write into Wallet",
"item": [
{
"name": "Dereference Webid",
"event": [
{
"listen": "test",
"script": {
"exec": [
"let jsonData = pm.response.json();",
"let storageUrl = jsonData[\"http://www.w3.org/ns/pim/space#storage\"][\"@id\"];",
"pm.collectionVariables.set(\"wallet.storage\", storageUrl.concat(\"wallet\"));",
"",
"console.log(\"Storage URL:\", pm.collectionVariables.get(\"wallet.storage\"));",
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/ld+json",
"type": "text"
}
],
"url": {
"raw": "{{agent1.webid}}",
"host": ["{{agent1.webid}}"]
}
},
"response": []
},
{
"name": "AR to Write in Wallet",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 201\", function() {",
" pm.response.to.have.status(201)",
"})",
"",
"pm.test(\"Discover created VC URI\", function() {",
" var vcUrl = pm.response.headers.get(\"Location\")",
" pm.expect(vcUrl).not.empty.string;",
" pm.collectionVariables.set(\"vc.uri\", vcUrl);",
"})",
"",
"",
"var jsonData = pm.response.json();",
"",
"pm.test(\"Discover proof endpoint\", function() {",
" pm.expect(jsonData.proof.verificationMethod).not.empty.string;",
" pm.collectionVariables.set(\"vc.proof.uri\", jsonData.proof.verificationMethod);",
"})",
"",
"",
"pm.test(\"Discover status URI\", function() {",
" pm.expect(jsonData.credentialStatus.id).not.empty.string;",
" pm.collectionVariables.set(\"vc.status.uri\", jsonData.credentialStatus.id);",
"})",
"",
"pm.collectionVariables.set(\"vc.body\", responseBody);"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{companionAppAccessToken}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"credential\": {\n \"@context\": [\"https://www.w3.org/2018/credentials/v1\", \"https://schema.inrupt.com/credentials/v1.jsonld\"],\n \"type\": [\"VerifiableCredential\"],\n \"credentialSubject\": {\n \"hasConsent\": [{\n \"mode\":[\"http://www.w3.org/ns/auth/acl#Write\"],\n \"forPersonalData\": [\n \"{{wallet.storage}}\"\n ],\n \"isConsentForDataSubject\": \"{{agent1.webid}}\",\n \"hasStatus\":\"https://w3id.org/GConsent#ConsentStatusRequested\",\n \"forPurpose\":\"https://example.com/SpecificPurpose\"\n }]\n }\n }\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{vc}}/issue",
"host": ["{{vc}}"],
"path": ["issue"]
}
},
"response": []
},
{
"name": "Send AR to inbox",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"var vp = \"{\\\"@context\\\": [ \\\"https://www.w3.org/2018/credentials/v1\\\" ], \\\"type\\\": \\\"VerifiablePresentation\\\", \\\"verifiableCredential\\\": [\" + pm.collectionVariables.get(\"vc.body\") + \" ]}\"",
"",
"pm.collectionVariables.set(\"vp\", vp);"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{companionAppAccessToken}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{{vp}}\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{pod}}inbox/",
"host": ["{{pod}}inbox"],
"path": [""]
}
},
"response": []
},
{
"name": "Get List ARs from Inbox",
"event": [
{
"listen": "test",
"script": {
"exec": [
"",
"pm.test(\"Status code is 200\", function() {",
" pm.response.to.have.status(200)",
"})",
"",
"var jsonData = pm.response.json();",
"if (jsonData.length > 0) {",
" pm.collectionVariables.set(\"wallet.access.request.id\", jsonData[0].uuid);",
"}"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{walletAccessToken}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "{{wallet_api}}/inbox",
"host": ["{{wallet_api}}"],
"path": ["inbox"]
}
},
"response": []
},
{
"name": "Accept Access Request",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{walletAccessToken}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [],
"url": {
"raw": "{{wallet_api}}/inbox/{{wallet.access.request.id}}/grantAccess",
"host": ["{{wallet_api}}"],
"path": ["inbox", "{{wallet.access.request.id}}", "grantAccess"]
}
},
"response": []
},
{
"name": "List Access Grants",
"event": [
{
"listen": "test",
"script": {
"exec": [
"",
"pm.test(\"Status code is 200\", function() {",
" pm.response.to.have.status(200)",
"})",
"",
"var jsonData = pm.response.json();",
"if (jsonData.length > 0) {",
" pm.collectionVariables.set(\"wallet.access.grant.id\", jsonData[0].uuid);",
"}"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{walletAccessToken}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "{{wallet_api}}/accessgrants",
"host": ["{{wallet_api}}"],
"path": ["accessgrants"]
}
},
"response": []
},
{
"name": "Get Access Grant",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function() {",
" pm.response.to.have.status(200)",
"})",
"",
"var jsonData = pm.response.json();",
"",
"pm.test(\"Discover status URI\", function() {",
" pm.expect(jsonData.credentialStatus.id).not.empty.string;",
" pm.collectionVariables.set(\"vc.status.uri\", jsonData.credentialStatus.id);",
"})",
"pm.test(\"Discover created VC URI\", function() {",
" pm.collectionVariables.set(\"vp\", responseBody);",
"})",
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{walletAccessToken}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "{{wallet_api}}/accessgrants/{{wallet.access.grant.id}}",
"host": ["{{wallet_api}}"],
"path": ["accessgrants", "{{wallet.access.grant.id}}"]
}
},
"response": []
}
],
"description": "Documentation can be found in the following link:\n\n[https://docs.inrupt.com/data-wallet/patterns-and-flows/#sharing-wallet-digital-identity](https://docs.inrupt.com/data-wallet/patterns-and-flows/#sharing-wallet-digital-identity)"
},
{
"name": "Flow:Access Prompt",
"item": [
{
"name": "Access Prompt to Companion App",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{companionAppToken}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{ \"resource\": \"{{resource_accessprompt}}\",\n \"client\": \"{{appClientID}}\",\n \"webid\":\"{{webid_wallet}}\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{companionapp_api}}/accessprompt",
"host": ["{{companionapp_api}}"],
"path": ["accessprompt"]
}
},
"response": []
},
{
"name": "Get List ARs from Inbox",
"event": [
{
"listen": "test",
"script": {
"exec": [
"",
"pm.test(\"Status code is 200\", function() {",
" pm.response.to.have.status(200)",
"})",
"",
"var jsonData = pm.response.json();",
"if (jsonData.length > 0) {",
" pm.collectionVariables.set(\"wallet.access.request.id\", jsonData[0].uuid);",
"}"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{walletAccessToken}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "{{wallet_api}}/inbox",
"host": ["{{wallet_api}}"],
"path": ["inbox"]
}
},
"response": []
},
{
"name": "Grant Access Request",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{walletAccessToken}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [],
"url": {
"raw": "{{wallet_api}}/inbox/{{wallet.access.request.id}}/grantAccess",
"host": ["{{wallet_api}}"],
"path": ["inbox", "{{wallet.access.request.id}}", "grantAccess"]
}
},
"response": []
},
{
"name": "List Access Grants",
"event": [
{
"listen": "test",
"script": {
"exec": [
"",
"pm.test(\"Status code is 200\", function() {",
" pm.response.to.have.status(200)",
"})",
"",
"var jsonData = pm.response.json();",
"if (jsonData.length > 0) {",
" pm.collectionVariables.set(\"wallet.access.grant.id\", jsonData[0].uuid);",
"}",
"",
"console.log(pm.collectionVariables.get(\"wallet.access.grant.id\"));"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{walletAccessToken}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "{{wallet_api}}/accessgrants",
"host": ["{{wallet_api}}"],
"path": ["accessgrants"]
}
},
"response": []
},
{
"name": "Get Access Grant",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{walletAccessToken}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "{{wallet_api}}/accessgrants/{{wallet.access.grant.id}}",
"host": ["{{wallet_api}}"],
"path": ["accessgrants", "{{wallet.access.grant.id}}"]
}
},
"response": []
}
],
"description": "Documentation can be found in the following link:\n\n[https://docs.inrupt.com/data-wallet/patterns-and-flows/#scan-a-qr-code-to-share-a-resource](https://docs.inrupt.com/data-wallet/patterns-and-flows/#scan-a-qr-code-to-share-a-resource)\n\nThe companion app needs an endpoint to trigger an Access Request and send it to the Wallet inbox."
},
{
"name": "Other Consent Behavior",
"item": [
{
"name": "Delete Access Grant",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{walletAccessToken}}",
"type": "string"
}
]
},
"method": "DELETE",
"header": [],
"url": {
"raw": "{{wallet_api}}/accessgrants/{{wallet.access.grant.id}}",
"host": ["{{wallet_api}}"],
"path": ["accessgrants", "{{wallet.access.grant.id}}"]
}
},
"response": []
},
{
"name": "Revoke Access Grant",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{walletAccessToken}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [],
"url": {
"raw": "{{wallet_api}}/accessgrants/{{wallet.access.grant.id}}/revoke",
"host": ["{{wallet_api}}"],
"path": ["accessgrants", "{{wallet.access.grant.id}}", "revoke"]
}
},
"response": []
},
{
"name": "Bulk Revoke Access Grant",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{walletAccessToken}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"uuids\": [\"{{wallet.access.grant.id}}\"]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{wallet_api}}/accessgrants/revoke",
"host": ["{{wallet_api}}"],
"path": ["accessgrants", "revoke"]
}
},
"response": []
},
{
"name": "Deny Access Request",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{walletAccessToken}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [],
"url": {
"raw": "{{wallet_api}}/inbox/{{wallet.access.request.id}}/denyAccess",
"host": ["{{wallet_api}}"],
"path": ["inbox", "{{wallet.access.request.id}}", "denyAccess"]
}
},
"response": []
}
],
"description": "These requests deal with another consent cases such as revoke access to a resource or deny an access requests.\n\nMore information can be found here: [https://docs.inrupt.com/data-wallet/features/#requests](https://docs.inrupt.com/data-wallet/features/#requests)"
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"packages": {},
"exec": [""]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"packages": {},
"exec": [""]
}
}
],
"variable": [
{
"key": "accessToken",
"value": ""
},
{
"key": "wallet.resource.file.name",
"value": ""
},
{
"key": "accessTokenDemo",
"value": ""
},
{
"key": "vc.uri",
"value": ""
},
{
"key": "vc.proof.uri",
"value": ""
},
{
"key": "vc.status.uri",
"value": ""
},
{
"key": "vc.body",
"value": ""
},
{
"key": "vp",
"value": ""
},
{
"key": "vc",
"value": ""
},
{
"key": "wallet.access.request.id",
"value": ""
},
{
"key": "wallet.access.grant.id",
"value": ""
},
{
"key": "wallet.storage",
"value": ""
},
{
"key": "accessTokenTest",
"value": ""
},
{
"key": "uma.ticket",
"value": ""
},
{
"key": "uma.access_token",
"value": ""
},
{
"key": "vp.encoded",
"value": ""
},
{
"key": "walletAccessToken",
"value": ""
},
{
"key": "businessAppAccessToken",
"value": ""
},
{
"key": "companionAppAccessToken",
"value": ""
}
]
}