Merge pull request #13360 from annando/issue-12815

Issue 12815: JsonLD parsing problems with data-integrity
This commit is contained in:
Hypolite Petovan 2023-08-20 08:53:30 -04:00 committed by GitHub
commit b218a7f218
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 108 additions and 0 deletions

View file

@ -46,6 +46,12 @@ class JsonLD
case 'https://w3id.org/security/v1': case 'https://w3id.org/security/v1':
$url = DI::basePath() . '/static/security-v1.jsonld'; $url = DI::basePath() . '/static/security-v1.jsonld';
break; 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': case 'https://w3id.org/identity/v1':
$url = DI::basePath() . '/static/identity-v1.jsonld'; $url = DI::basePath() . '/static/identity-v1.jsonld';
break; break;

View file

@ -0,0 +1,72 @@
{
"@context": {
"id": "@id",
"type": "@type",
"proof": {
"@id": "https://w3id.org/security#proof",
"@type": "@id"
},
"DataIntegrityProof": {
"@id": "https://w3id.org/security#DataIntegrityProof",
"@context": {
"@protected": true,
"id": "@id",
"type": "@type",
"challenge": "https://w3id.org/security#challenge",
"created": {
"@id": "http://purl.org/dc/terms/created",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"domain": "https://w3id.org/security#domain",
"expires": {
"@id": "https://w3id.org/security#expiration",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"nonce": "https://w3id.org/security#nonce",
"proofPurpose": {
"@id": "https://w3id.org/security#proofPurpose",
"@type": "@vocab",
"@context": {
"@protected": true,
"id": "@id",
"type": "@type",
"assertionMethod": {
"@id": "https://w3id.org/security#assertionMethod",
"@type": "@id",
"@container": "@set"
},
"authentication": {
"@id": "https://w3id.org/security#authenticationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityInvocation": {
"@id": "https://w3id.org/security#capabilityInvocationMethod",
"@type": "@id",
"@container": "@set"
},
"capabilityDelegation": {
"@id": "https://w3id.org/security#capabilityDelegationMethod",
"@type": "@id",
"@container": "@set"
},
"keyAgreement": {
"@id": "https://w3id.org/security#keyAgreementMethod",
"@type": "@id",
"@container": "@set"
}
}
},
"cryptosuite": "https://w3id.org/security#cryptosuite",
"proofValue": {
"@id": "https://w3id.org/security#proofValue",
"@type": "https://w3id.org/security#multibase"
},
"verificationMethod": {
"@id": "https://w3id.org/security#verificationMethod",
"@type": "@id"
}
}
}
}
}

View file

@ -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"
}
}
}
}
}