mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 23:09:29 -07:00
Add openpgp4fpr to keyData object
This commit is contained in:
parent
a5040cb223
commit
29ccb63bf1
2 changed files with 7 additions and 0 deletions
|
@ -42,6 +42,9 @@ const apiProfileSchema = {
|
||||||
fingerprint: {
|
fingerprint: {
|
||||||
type: "string"
|
type: "string"
|
||||||
},
|
},
|
||||||
|
openpgp4fpr: {
|
||||||
|
type: "string"
|
||||||
|
},
|
||||||
users: {
|
users: {
|
||||||
type: "array",
|
type: "array",
|
||||||
items: {
|
items: {
|
||||||
|
|
|
@ -35,6 +35,7 @@ const generateWKDProfile = async (id) => {
|
||||||
return keys.fetchWKD(id)
|
return keys.fetchWKD(id)
|
||||||
.then(async key => {
|
.then(async key => {
|
||||||
let keyData = await doip.keys.process(key.publicKey)
|
let keyData = await doip.keys.process(key.publicKey)
|
||||||
|
keyData.openpgp4fpr = `openpgp4fpr:${keyData.fingerprint.toLowerCase()}`
|
||||||
keyData.key.fetchMethod = 'wkd'
|
keyData.key.fetchMethod = 'wkd'
|
||||||
keyData.key.uri = key.fetchURL
|
keyData.key.uri = key.fetchURL
|
||||||
keyData.key.data = {}
|
keyData.key.data = {}
|
||||||
|
@ -61,6 +62,7 @@ const generateHKPProfile = async (id, keyserverDomain) => {
|
||||||
return keys.fetchHKP(id, keyserverDomain)
|
return keys.fetchHKP(id, keyserverDomain)
|
||||||
.then(async key => {
|
.then(async key => {
|
||||||
let keyData = await doip.keys.process(key.publicKey)
|
let keyData = await doip.keys.process(key.publicKey)
|
||||||
|
keyData.openpgp4fpr = `openpgp4fpr:${keyData.fingerprint.toLowerCase()}`
|
||||||
keyData.key.fetchMethod = 'hkp'
|
keyData.key.fetchMethod = 'hkp'
|
||||||
keyData.key.uri = key.fetchURL
|
keyData.key.uri = key.fetchURL
|
||||||
keyData.key.data = {}
|
keyData.key.data = {}
|
||||||
|
@ -87,6 +89,7 @@ const generateSignatureProfile = async (signature) => {
|
||||||
return keys.fetchSignature(signature)
|
return keys.fetchSignature(signature)
|
||||||
.then(async key => {
|
.then(async key => {
|
||||||
let keyData = key.keyData
|
let keyData = key.keyData
|
||||||
|
keyData.openpgp4fpr = `openpgp4fpr:${keyData.fingerprint.toLowerCase()}`
|
||||||
delete key.keyData
|
delete key.keyData
|
||||||
keyData.key.data = {}
|
keyData.key.data = {}
|
||||||
keyData = processKeyData(keyData)
|
keyData = processKeyData(keyData)
|
||||||
|
@ -112,6 +115,7 @@ const generateKeybaseProfile = async (username, fingerprint) => {
|
||||||
return keys.fetchKeybase(id, keyserverDomain)
|
return keys.fetchKeybase(id, keyserverDomain)
|
||||||
.then(async key => {
|
.then(async key => {
|
||||||
let keyData = await doip.keys.process(key.publicKey)
|
let keyData = await doip.keys.process(key.publicKey)
|
||||||
|
keyData.openpgp4fpr = `openpgp4fpr:${keyData.fingerprint.toLowerCase()}`
|
||||||
keyData.key.fetchMethod = 'hkp'
|
keyData.key.fetchMethod = 'hkp'
|
||||||
keyData.key.uri = key.fetchURL
|
keyData.key.uri = key.fetchURL
|
||||||
keyData.key.data = {}
|
keyData.key.data = {}
|
||||||
|
|
Loading…
Reference in a new issue