{"@context":["https://example.org/did/v1","https://example.org/ocap/v1","http://schema.org"],"id":"did:example:83f75926-51ba-4472-84ff-51f5e39ab9ab","type":"Person","name":"Alice","publicKey":[{"id":"did:example:83f75926-51ba-4472-84ff-51f5e39ab9ab#key-1","owner":"did:example:83f75926-51ba-4472-84ff-51f5e39ab9ab","publicKeyPem":"-----BEGINPUBLICKEY-----rn..."}]}
{"@context":["https://example.org/did/v1","https://example.org/ocap/v1","http://schema.org"],"id":"https://autocar12A15.example/a-fancy-car","type":"Service","name":"AutonomousCar12A15","publicKey":[{"id":"did:example:0b36c784-f9f4-4c1e-b76c-d821a4b32741#key-1","owner":"did:example:0b36c784-f9f4-4c1e-b76c-d821a4b32741","publicKeyPem":"-----BEGINPUBLICKEY-----rn..."}]}
{"@context":["https://example.org/did/v1","https://example.org/ocap/v1","http://schema.org"],"id":"did:example:ee568de7-2970-4925-ad09-c685ab367b66","type":"Person","name":"Bob","publicKey":[{"id":"did:example:ee568de7-2970-4925-ad09-c685ab367b66#key-1","owner":"did:example:ee568de7-2970-4925-ad09-c685ab367b66","publicKeyPem":"-----BEGINPUBLICKEY-----rn..."}]}
{"@context":["https://w3id.org/security/v2","https://autopower.example/"],"id":"https://autocar12A15.example/a-fancy-car/proc/7a397d7b","parentCapability":"https://autocar12A15.example/a-fancy-car","invoker":"https://social.example/alice#key-for-car","proof":{"type":"Ed25519Signature2018","created":"2018-02-13T21:26:08Z","capabilityChain":["https://autocar12A15.example/a-fancy-car"],"jws":"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..lfAFjrWE-4RxhL0gtzSMRX72NR9SRDgaMmkjPA4if0ERbw4R2bnts5sAs8OyhAlbFzBAKOqrFk57AYqwSR2vCw","proofPurpose":"capabilityDelegation","verificationMethod":"https://example.com/i/alice/keys/1"}}
{"@context":["https://example.org/zcap/v1","https://autopower.example/"],"id":"urn:uuid:ad86cb2c-e9db-434a-beae-71b82120a8a4","action":"Drive","proof":{"type":"RsaSignature2016","proofPurpose":"capabilityInvocation","capability":"https://autocar12A15.example/a-fancy-car/proc/7a397d7b","created":"2016-02-08T17:13:48Z","creator":"https://social.example/alice/#key-for-car","signatureValue":"..."}}
action-要执行什么样的动作Drive-打开汽车并到达办公室
capabiltiy:在此汽车上的能力取决于汽车12A15
{"@context":["https://example.org/zcap/v1","https://autopower.example/"],"id":"https://social.example/alice/caps#79795d78","parentCapability":"https://autocar12A15.example/a-fancy-car/proc/7a397d7b","invoker":"https://bob.example/bob/#key-33","caveat":[{"type":"ValidWhileTrue","uri":"https://social.example/alice/bob-can-still-use-car"}],"proof":{"type":"RsaSignature2016","proofPurpose":"capabilityDelegation","created":"2017-03-28T06:01:25Z","creator":"https://social.example/alice/#key-for-car","signatureValue":"..."}}警告:它允许将来撤销,只要警告是真的,Bob可以使用Alice汽车,或者以其他方式autocar12A15将允许Bob使用其服务,只要警告成立。invoker:Alice授予对Bob密钥之一的访问权proof:Alice用她被授予对autocar12A15的授权权的密钥
{"@context":["https://example.org/zcap/v1","https://autopower.example/"],"id":"https://bob.example/bob/caps#2cdea8c1","parentCapability":"https://social.example/alice/caps#79795d78","invoker":"https://carol.example/#key-bf36","caveat":[{"type":"DriveNoMoreThan","kilometers":4000}],"proof":{"type":"RsaSignature2016","proofPurpose":"capabilityDelegation","created":"2017-06-13T19:15:03Z","creator":"https://bob.example/bob/#key-33","signatureValue":"..."}}//警告:Alice的仪表显示目前行驶了3995公里,因此这只比当前值多了5公里invoker:授权卡罗尔使用汽车服务proof:Bob签署了这个对象,现在autocar12A15将允许carol使用其服务,如果需要,carol最多可以使用5公里的路程
Pratap Singh
作者:链三丰,来源:区块链研究实验室
郑重声明:本文版权归原作者所有,转载文章仅为传播更多信息之目的,如作者信息标记有误,请第一时间联系我们修改或删除,多谢。
郑重声明:本文版权归原作者所有,转载文章仅为传播更多信息之目的,如作者信息标记有误,请第一时间联系我们修改或删除,多谢。