]> git.mxchange.org Git - friendica.git/commitdiff
Added another context
authorMichael <heluecht@pirati.ca>
Sun, 20 Aug 2023 12:13:25 +0000 (12:13 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 20 Aug 2023 12:13:25 +0000 (12:13 +0000)
src/Util/JsonLD.php
static/security-multikey-v1.jsonld [new file with mode: 0644]

index 8f492bdcf67b966914bf90686f61f23e8c1de52b..63787db08b8eb37c97ae775fb16e84eb6698ea49 100644 (file)
@@ -46,12 +46,15 @@ class JsonLD
                        case 'https://w3id.org/security/v1':
                                $url = DI::basePath() . '/static/security-v1.jsonld';
                                break;
-                       case 'https://w3id.org/identity/v1':
-                               $url = DI::basePath() . '/static/identity-v1.jsonld';
-                               break;
                        case 'https://w3id.org/security/data-integrity/v1':
                                $url = DI::basePath() . '/static/security-data-integrity-v1.jsonld';
                                break;
+                       case 'https://w3id.org/security/multikey/v1':
+                               $url = DI::basePath() . '/static/security-multikey-v1.jsonld';
+                               break;
+                       case 'https://w3id.org/identity/v1':
+                               $url = DI::basePath() . '/static/identity-v1.jsonld';
+                               break;
                        case 'https://www.w3.org/ns/activitystreams':
                                $url = DI::basePath() . '/static/activitystreams.jsonld';
                                break;
@@ -98,7 +101,7 @@ class JsonLD
 
                $result = DI::cache()->get('documentLoader:' . $url);
                if (!is_null($result)) {
-                       return $result;
+                       //return $result;
                }
 
                $data = jsonld_default_document_loader($url);
diff --git a/static/security-multikey-v1.jsonld b/static/security-multikey-v1.jsonld
new file mode 100644 (file)
index 0000000..21f7460
--- /dev/null
@@ -0,0 +1,30 @@
+{
+  "@context": {
+    "id": "@id",
+    "type": "@type",
+    "Multikey": {
+      "@id": "https://w3id.org/security#Multikey",
+      "@context": {
+        "@protected": true,
+        "id": "@id",
+        "type": "@type",
+        "controller": {
+          "@id": "https://w3id.org/security#controller",
+          "@type": "@id"
+        },
+        "revoked": {
+          "@id": "https://w3id.org/security#revoked",
+          "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
+        },
+        "publicKeyMultibase": {
+          "@id": "https://w3id.org/security#publicKeyMultibase",
+          "@type": "https://w3id.org/security#multibase"
+        },
+        "secretKeyMultibase": {
+          "@id": "https://w3id.org/security#secretKeyMultibase",
+          "@type": "https://w3id.org/security#multibase"
+        }
+      }
+    }
+  }
+}
\ No newline at end of file