1 |
|
2 |
|
3 |
|
4 | const bedrock = require('bedrock');
|
5 |
|
6 | const jsonldType = require('./jsonldType');
|
7 | const w3cDateTime = require('./w3cDateTime');
|
8 | const identifier = require('./identifier');
|
9 |
|
10 | const schema = {
|
11 | title: 'GraphSignature',
|
12 | description: 'A digital signature on a graph.',
|
13 | type: 'object',
|
14 | properties: {
|
15 | id: identifier(),
|
16 | type: jsonldType('GraphSignature2012'),
|
17 | creator: identifier(),
|
18 | created: w3cDateTime(),
|
19 | signatureValue: {
|
20 | title: 'Digital Signature Value',
|
21 | description: 'A base-64 encoded byte string containing the result of ' +
|
22 | 'the GraphSignature2012 algorithm.',
|
23 | type: 'string'
|
24 | },
|
25 |
|
26 | required: ['type', 'creator', 'created', 'signatureValue']
|
27 | },
|
28 | additionalProperties: false
|
29 | };
|
30 |
|
31 | module.exports = function(extend) {
|
32 | if(extend) {
|
33 | return bedrock.util.extend(true, bedrock.util.clone(schema), extend);
|
34 | }
|
35 | return schema;
|
36 | };
|