Skip to content

Instantly share code, notes, and snippets.

@dlongley
Last active February 13, 2018 17:46
Show Gist options
  • Save dlongley/1762f214f18d8cc63af8ff2853c1c5e1 to your computer and use it in GitHub Desktop.
Save dlongley/1762f214f18d8cc63af8ff2853c1c5e1 to your computer and use it in GitHub Desktop.
DID + ocaps
{
'@context': 'https://w3id.org/veres-one/v1',
id: did,
// implicitly has a type of LinkedDataObjectCapability itself
authentication: [{
type: 'RsaSignatureAuthentication2018',
publicKey: {
// this key can be used to authenticate as DID entity
id: did + '#authn-key-1',
type: 'RsaSigningKey2018',
owner: did,
publicKeyPem: '...'
}
}],
grantCapability: [{
type: 'RsaSignatureCapabilityAuthorization2018',
publicKey: {
// this key can be used to grant capabilities as DID entity
id: did + '#ocap-grant-key-1',
type: 'RsaSigningKey2018',
owner: did,
publicKeyPem: '...'
}
}],
invokeCapability: [{
type: 'RsaSignatureCapabilityAuthorization2018',
publicKey: {
// this key can be used to invoke capabilities as DID entity
id: did + '#ocap-invoke-key-1',
type: 'RsaSigningKey2018',
owner: did,
publicKeyPem: '...'
}
}]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment