forked from Mirrors/doipjs
Remove message proof format
This commit is contained in:
parent
24b06d5d4c
commit
bdcff2ec89
15 changed files with 13 additions and 22 deletions
|
@ -47,7 +47,7 @@ const processURI = (uri) => {
|
|||
}
|
||||
},
|
||||
claim: {
|
||||
format: E.ClaimFormat.MESSAGE,
|
||||
format: E.ClaimFormat.URI,
|
||||
relation: E.ClaimRelation.CONTAINS,
|
||||
path: ['body_markdown']
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ const processURI = (uri) => {
|
|||
}
|
||||
},
|
||||
claim: {
|
||||
format: E.ClaimFormat.MESSAGE,
|
||||
format: E.ClaimFormat.URI,
|
||||
relation: E.ClaimRelation.CONTAINS,
|
||||
path: ['user', 'bio_raw']
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ const processURI = (uri) => {
|
|||
}
|
||||
},
|
||||
claim: {
|
||||
format: E.ClaimFormat.MESSAGE,
|
||||
format: E.ClaimFormat.URI,
|
||||
relation: E.ClaimRelation.EQUALS,
|
||||
path: ['description']
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ const processURI = (uri) => {
|
|||
}
|
||||
},
|
||||
claim: {
|
||||
format: E.ClaimFormat.MESSAGE,
|
||||
format: E.ClaimFormat.URI,
|
||||
relation: E.ClaimRelation.CONTAINS,
|
||||
path: ['files', 'openpgp.md', 'content']
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ const processURI = (uri) => {
|
|||
}
|
||||
},
|
||||
claim: {
|
||||
format: E.ClaimFormat.MESSAGE,
|
||||
format: E.ClaimFormat.URI,
|
||||
relation: E.ClaimRelation.EQUALS,
|
||||
path: ['description']
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ const processURI = (uri) => {
|
|||
}
|
||||
},
|
||||
claim: {
|
||||
format: E.ClaimFormat.MESSAGE,
|
||||
format: E.ClaimFormat.URI,
|
||||
relation: E.ClaimRelation.CONTAINS,
|
||||
path: ['statements', 'content']
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ const processURI = (uri) => {
|
|||
}
|
||||
},
|
||||
claim: {
|
||||
format: E.ClaimFormat.MESSAGE,
|
||||
format: E.ClaimFormat.URI,
|
||||
relation: E.ClaimRelation.CONTAINS,
|
||||
path: ['about']
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ const processURI = (uri) => {
|
|||
}
|
||||
},
|
||||
claim: {
|
||||
format: E.ClaimFormat.MESSAGE,
|
||||
format: E.ClaimFormat.URI,
|
||||
relation: E.ClaimRelation.CONTAINS,
|
||||
path: ['content', 'body']
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ const processURI = (uri) => {
|
|||
}
|
||||
},
|
||||
claim: {
|
||||
format: E.ClaimFormat.MESSAGE,
|
||||
format: E.ClaimFormat.URI,
|
||||
relation: E.ClaimRelation.CONTAINS,
|
||||
path: ['data', 'children', 'data', 'selftext']
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ const processURI = (uri) => {
|
|||
}
|
||||
},
|
||||
claim: {
|
||||
format: E.ClaimFormat.MESSAGE,
|
||||
format: E.ClaimFormat.URI,
|
||||
relation: E.ClaimRelation.CONTAINS,
|
||||
path: ['items', 'about_me']
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ const processURI = (uri) => {
|
|||
}
|
||||
},
|
||||
claim: {
|
||||
format: E.ClaimFormat.MESSAGE,
|
||||
format: E.ClaimFormat.URI,
|
||||
relation: E.ClaimRelation.CONTAINS,
|
||||
path: []
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ const processURI = (uri) => {
|
|||
}
|
||||
},
|
||||
claim: {
|
||||
format: E.ClaimFormat.MESSAGE,
|
||||
format: E.ClaimFormat.URI,
|
||||
relation: E.ClaimRelation.CONTAINS,
|
||||
path: []
|
||||
}
|
||||
|
|
|
@ -95,9 +95,7 @@ const ClaimFormat = {
|
|||
/** `openpgp4fpr:123123123` */
|
||||
URI: 0,
|
||||
/** `123123123` */
|
||||
FINGERPRINT: 1,
|
||||
/** `[Verifying my OpenPGP key: openpgp4fpr:123123123]` */
|
||||
MESSAGE: 2
|
||||
FINGERPRINT: 1
|
||||
}
|
||||
Object.freeze(ClaimFormat)
|
||||
|
||||
|
|
|
@ -56,8 +56,6 @@ const generateClaim = (fingerprint, format) => {
|
|||
switch (format) {
|
||||
case E.ClaimFormat.URI:
|
||||
return `openpgp4fpr:${fingerprint}`
|
||||
case E.ClaimFormat.MESSAGE:
|
||||
return `[Verifying my OpenPGP key: openpgp4fpr:${fingerprint}]`
|
||||
case E.ClaimFormat.FINGERPRINT:
|
||||
return fingerprint
|
||||
default:
|
||||
|
|
|
@ -28,11 +28,6 @@ describe('utils.generateClaim', () => {
|
|||
doipjs.utils.generateClaim('123456789', doipjs.enums.ClaimFormat.URI)
|
||||
).to.equal('openpgp4fpr:123456789')
|
||||
})
|
||||
it('should generate a correct "message" claim', () => {
|
||||
expect(
|
||||
doipjs.utils.generateClaim('123456789', doipjs.enums.ClaimFormat.MESSAGE)
|
||||
).to.equal('[Verifying my OpenPGP key: openpgp4fpr:123456789]')
|
||||
})
|
||||
it('should generate a correct "fingerprint" claim', () => {
|
||||
expect(
|
||||
doipjs.utils.generateClaim(
|
||||
|
|
Loading…
Reference in a new issue