reiver-fediverse/acct-uri.html

191 lines
6.3 KiB
HTML
Raw Permalink Normal View History

2023-11-17 18:06:47 +00:00
<article>
<h1>acct URI (Fediverse)</h1>
<section>
<address class="h-card">
by
<a rel="author" class="u-url" href="http://changelog.ca/"><span class="p-given-name">Charles</span> <span class="p-additional-name">Iliya</span> <span class="p-family-name">Krempeaux</span></a>
</address>
</section>
<section>
<p>
An <strong>acct URI</strong> looks like this:
</p>
<pre>
2023-11-17 18:24:55 +00:00
2023-11-17 18:06:47 +00:00
acct:joeblow@example.com
2023-11-17 18:24:55 +00:00
2023-11-17 18:06:47 +00:00
</pre>
<p>
Typically an <strong>acct URI</strong> is used to turn an <strong>e-mail address</strong> or <ziba-link name="id">Fediverse ID</ziba-link> into a URL / URI.
(There are reasons why one might want to turn a pointer or identifier that isn' a URL / URI into a URL / URI.)
</p>
<p>
For example, this <ziba-link name="id">Fediverse ID</ziba-link>:
</p>
<pre>
2023-11-17 18:24:55 +00:00
2023-11-17 18:06:47 +00:00
@reiver@changelog.ca
2023-11-17 18:24:55 +00:00
2023-11-17 18:06:47 +00:00
</pre>
<p>
Gets turned into this <strong>acct URI</strong>:
</p>
<pre>
2023-11-17 18:24:55 +00:00
2023-11-17 18:06:47 +00:00
acct:reiver@changelog.ca
2023-11-17 18:24:55 +00:00
2023-11-17 18:06:47 +00:00
</pre>
</section>
2023-11-17 23:08:29 +00:00
<section>
<h2>Why acct URIs</h1>
<p>
The TL;DR of <em>why acct URIs‽</em> is —
</p>
<ul>
<li>
<p>
… because people seem to be comfortable with something that looks more like an <strong>e-mail address</strong> or as <strong>username</strong> as an <strong>identifier</strong> but the technology only understands URLs and URIs;
so you still have to turn things that look like <strong>e-mail address</strong> and <strong>usernames</strong> into URLs and URIs;
which is what <strong>acct URI</strong> is;
and “no”, mailto URI won't work;
</p>
<p>
… because a new URI scheme makes it easy to identify that it should be used with <ziba-link transform="lowercase">WebFinger</ziba-link> (rather than being able to do something else with it).
</p>
</li>
</ul>
<p>
There are many conceptual places where some kind of an <strong>identifier</strong> is a core part of it.
</p>
<p>
For example, on any social protocol I am aware of, there is some type of notion of an <strong>identifier</strong>.
</p>
<p>
BBS echo-mail has them.
BBS net-mail has them.
Internet e-mail has them.
Internet finger-protocol has them.
Internet gemini-protocol has them.
(Multi-User) Linux &amp; Unix operating systems have them.
Twitter has them.
Etc.
</p>
<p>
The <strong>identifier</strong> enables you to send messages, to share photos &amp; images, to control data, etc.
</p>
<p>
With a single centralized system, dealing with <strong>identifiers</strong> is comparatively more straight-forward.
But when dealing with a distributed, decentralized, or federated system, things can get more complex — for example, how do you point to and interact with someone or something from a different node on the network?
Etc.
</p>
<p>
Experience (with OpenID and other systems) seems to suggest that (at least currently) most people are more comfortable with using something that looks more like an <strong>e-mail address</strong> or as <strong>username</strong> as an <strong>identifier</strong> rather than a URL or a URI.
For example —
</p>
<ul>
<li>joeblow@example.com</li>
<li>jandoe@something.example</li>
<li>actor@host</li>
</ul>
<p>
<ziba-link name="id">Fediverse ID</ziba-link>s look very similar to e-mail addresses.
They just have a U+0040 at-sign ("@") at the beginning of them:
</p>
<ul>
<li>@joeblow@example.com</li>
<li>@jandoe@something.example</li>
<li>@actor@host</li>
</ul>
<p>
But <ziba-link transform="lowercase">WebFinger</ziba-link> only understand URLs and URIs.
So those have to be turned into URLs or URIs.
Which, usually, is very straight-forward:
</p>
<ul>
<li>acct:joeblow@example.com</li>
<li>acct:jandoe@something.example</li>
<li>acct:actor@host</li>
</ul>
</section>
2023-11-17 18:06:47 +00:00
<section>
<h2>Fediverse Users</h2>
<p>
Most users of the <strong>Fediverse</strong> aren't aware of <strong>acct URI</strong>s.
And really, they don't have to be aware of them!
</p>
</section>
<section>
<h2>Fediverse Programmers</h2>
<p>
But behind the scenes, <strong>acct URI</strong>s are used by <ziba-link name="softwware">Fediverse software</ziba-link>.
</p>
<p>
Behind the scenes, a <ziba-link name="id">Fediverse ID</ziba-link> is turned into a <strong>acct URI</strong>, and then that <strong>acct URI</strong> is used to in a request to <ziba-link transform="lowercase">WebFinger</ziba-link> .
</p>
<p>
If you are a <strong>programmer</strong> / <strong>software engineer</strong> / <strong>software developer</strong> / etc, then you may need to be aware of <strong>acct URI</strong>s, and have some level of understanding of them.
</p>
</section>
2023-11-17 18:24:12 +00:00
<section>
<h2>Resolving</h2>
<h2>acct URI</h2>
<p>
Part of the process of <strong>resolving</strong> a <strong>Fediverse ID</strong> transfomrs a <strong>Fediverse ID</strong> into an <ziba-link dir=".." transform="lowercase">acct URI</ziba-link>.
(And then using that <ziba-link dir=".." transform="lowercase">acct URI</ziba-link> version of the <strong>Fediverse ID</strong> makes a request to <ziba-link dir=".." transform="lowercase">WebFinger</ziba-link>.)
</p>
<p>
Here is an example of transforming a <strong>Fediverse ID</strong> into an <ziba-link dir=".." transform="lowercase">acct URI</ziba-link>:
</p>
<pre>
at sign
@joeblow@example.com ← Fediverse ID
acct:joeblow@example.com ← acct URI
no at sign
</pre>
<p>
A client would then make a request to:
</p>
<pre>
https://example.com/.well-known/host-meta
</pre>
<p>
To discover what the (template) URL for <ziba-link dir=".." transform="lowercase">WebFinger</ziba-link> is.
And then, for example, if it is at:
</p>
<pre>
https://example.com/.well-known/webfinger?resource={uri}
</pre>
<p>
Then make a request to:
</p>
<pre>
https://example.com/.well-known/webfinger?resource=acct:joeblow@example.com
</pre>
<p>
This <ziba-link dir=".." transform="lowercase">WebFinger</ziba-link> implementation <em>could</em> accept whatever it wants.
It doesn't have to restrict itself to what is specified by the IETF RFC-7565 (The 'acct' URI Scheme) specification.
BUT —
</p>
</section>
2023-11-17 18:06:47 +00:00
<section>
<h2>See Also</h2>
<p>
For more information on <strong>acct URI</strong> see:
</p>
<ul>
<li>IETF RFC-7565</li>
</ul>
</section>
</article>