mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 23:09:29 -07:00
Add pleroma identity proof
This commit is contained in:
parent
e6a62d453d
commit
70486f418c
5 changed files with 52 additions and 5 deletions
|
@ -6,7 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
### Added
|
### Added
|
||||||
- Added discourse identity proof
|
- Discourse identity proof
|
||||||
|
- Pleroma identity proof
|
||||||
|
|
||||||
## [0.1.0] - 2020-07-05
|
## [0.1.0] - 2020-07-05
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -514,7 +514,7 @@ async function verifyProof(url, fingerprint) {
|
||||||
output.display = `${match[1]}@${match[2]}`;
|
output.display = `${match[1]}@${match[2]}`;
|
||||||
}
|
}
|
||||||
// Catchall
|
// Catchall
|
||||||
// Mastodon
|
// Fediverse
|
||||||
try {
|
try {
|
||||||
response = await fetch(url, {
|
response = await fetch(url, {
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -530,14 +530,26 @@ async function verifyProof(url, fingerprint) {
|
||||||
match = url.match(/https:\/\/(.*)\/@(.*)/);
|
match = url.match(/https:\/\/(.*)\/@(.*)/);
|
||||||
json.attachment.forEach((item, i) => {
|
json.attachment.forEach((item, i) => {
|
||||||
if (item.value.toUpperCase() === fingerprint.toUpperCase()) {
|
if (item.value.toUpperCase() === fingerprint.toUpperCase()) {
|
||||||
output.type = "mastodon";
|
output.type = "fediverse";
|
||||||
output.display = `@${match[2]}@${[match[1]]}`;
|
output.display = `@${json.preferredUsername}@${[match[1]]}`;
|
||||||
output.proofUrlFetch = json.url;
|
output.proofUrlFetch = json.url;
|
||||||
output.isVerified = true;
|
output.isVerified = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return output;
|
if (!output.type && 'summary' in json) {
|
||||||
|
match = url.match(/https:\/\/(.*)\/users\/(.*)/);
|
||||||
|
reVerify = new RegExp(`[Verifying my OpenPGP key: openpgp4fpr:${fingerprint}]`, 'i');
|
||||||
|
if (reVerify.test(json.summary)) {
|
||||||
|
output.type = "fediverse";
|
||||||
|
output.display = `@${json.preferredUsername}@${[match[1]]}`;
|
||||||
|
output.proofUrlFetch = json.url;
|
||||||
|
output.isVerified = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (output.type) {
|
||||||
|
return output;
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn(e);
|
console.warn(e);
|
||||||
}
|
}
|
||||||
|
@ -568,6 +580,8 @@ async function verifyProof(url, fingerprint) {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn(e);
|
console.warn(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Return output without confirmed proof
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
<h3>Adding proofs</h3>
|
<h3>Adding proofs</h3>
|
||||||
<a href="/guides/dns">Adding a DNS proof</a><br>
|
<a href="/guides/dns">Adding a DNS proof</a><br>
|
||||||
<a href="/guides/mastodon">Adding a Mastodon proof</a><br>
|
<a href="/guides/mastodon">Adding a Mastodon proof</a><br>
|
||||||
|
<a href="/guides/pleroma">Adding a Pleroma proof</a><br>
|
||||||
<a href="/guides/twitter">Adding a Twitter proof</a><br>
|
<a href="/guides/twitter">Adding a Twitter proof</a><br>
|
||||||
<a href="/guides/lobsters">Adding a Lobste.rs proof</a><br>
|
<a href="/guides/lobsters">Adding a Lobste.rs proof</a><br>
|
||||||
<a href="/guides/hackernews">Adding a Hackernews proof</a><br>
|
<a href="/guides/hackernews">Adding a Hackernews proof</a><br>
|
||||||
|
|
30
views/guides/pleroma.content.php
Normal file
30
views/guides/pleroma.content.php
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
<p>Let's add a decentralized Pleroma proof to your OpenPGP keys.</p>
|
||||||
|
|
||||||
|
<h3>Update the Pleroma account</h3>
|
||||||
|
|
||||||
|
<p>Log in to your Pleroma instance and add the following lines to your <strong>Bio</strong> (make sure to replace FINGERPRINT):</p>
|
||||||
|
<code>This is an OpenPGP proof that connects my OpenPGP key to this Pleroma account.
|
||||||
|
For details check out https://keyoxide.org/guides/openpgp-proofs
|
||||||
|
<br><br>[Verifying my OpenPGP key: openpgp4fpr:FINGERPRINT]
|
||||||
|
</code>
|
||||||
|
|
||||||
|
<h3>Update the PGP key</h3>
|
||||||
|
|
||||||
|
<p>First, edit the key (make sure to replace FINGERPRINT):</p>
|
||||||
|
<code>gpg --edit-key FINGERPRINT</code>
|
||||||
|
|
||||||
|
<p>Add a new notation:</p>
|
||||||
|
<code>notation</code>
|
||||||
|
|
||||||
|
<p>Enter the notation (make sure to update the link):</p>
|
||||||
|
<code>proof@metacode.biz=https://INSTANCE.ORG/users/@USERNAME</code>
|
||||||
|
|
||||||
|
<p>Please note that the <strong>/users/</strong> part of the URL is mandatory for the proof to work.</p>
|
||||||
|
|
||||||
|
<p>Save the key:</p>
|
||||||
|
<code>save</code>
|
||||||
|
|
||||||
|
<p>Upload the key to WKD or <a href="https://keys.openpgp.org">keys.openpgp.org</a> (make sure to replace FINGERPRINT):</p>
|
||||||
|
<code>gpg --send-keys FINGERPRINT</code>
|
||||||
|
|
||||||
|
<p>And you're done! Reload your profile page, it should now show a verified Fediverse account (Pleroma is part of the <a href="#https://en.wikipedia.org/wiki/Fediverse">Fediverse</a>).</p>
|
1
views/guides/pleroma.title.php
Normal file
1
views/guides/pleroma.title.php
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Adding a pleroma proof
|
Loading…
Reference in a new issue