mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 23:09:29 -07:00
feat: support openpgp4fpr in URL
This commit is contained in:
parent
a2857d1a3e
commit
9be8cab435
1 changed files with 10 additions and 0 deletions
|
@ -117,6 +117,7 @@ const generateAutoProfile = async (id) => {
|
||||||
let result
|
let result
|
||||||
|
|
||||||
const aspeRe = /aspe:(.*):(.*)/
|
const aspeRe = /aspe:(.*):(.*)/
|
||||||
|
const openpgpRe = /openpgp4fpr:(.*)/
|
||||||
|
|
||||||
if (aspeRe.test(id)) {
|
if (aspeRe.test(id)) {
|
||||||
result = await generateAspeProfile(id)
|
result = await generateAspeProfile(id)
|
||||||
|
@ -126,6 +127,15 @@ const generateAutoProfile = async (id) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (openpgpRe.test(id)) {
|
||||||
|
const match = id.match(openpgpRe)
|
||||||
|
result = await generateHKPProfile(match[1])
|
||||||
|
|
||||||
|
if (result && !('errors' in result)) {
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (id.includes('@')) {
|
if (id.includes('@')) {
|
||||||
result = await generateWKDProfile(id)
|
result = await generateWKDProfile(id)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue