From 245ef7c10ac5a4e502ab16cd7b5db00f0b92be09 Mon Sep 17 00:00:00 2001 From: Charles Iliya Krempeaux Date: Thu, 16 Nov 2023 15:27:07 -0800 Subject: [PATCH] fediverseid syntax --- fediverseid syntax.html | 131 ++++++++++++++++++++++++++++++++++++++++ fediverseid.html | 79 ++---------------------- index.html | 1 + 3 files changed, 137 insertions(+), 74 deletions(-) create mode 100644 fediverseid syntax.html diff --git a/fediverseid syntax.html b/fediverseid syntax.html new file mode 100644 index 0000000..f7d8bdc --- /dev/null +++ b/fediverseid syntax.html @@ -0,0 +1,131 @@ +
+

Fediverse ID (Fediverse)

+
+
+ by + +
+
+
+

+ The final say for what is and is not a valid Fediverse ID are the many implementations of WebFinger in-the-wild in all the different Fediverse software out there. + (Which could be different from each other.) +

+

+ Because, from a technical point-of-view, a Fediverse ID is turned into an acct URI and then resolved with WebFinger. +

+

+ Also, there currently is no canonical syntax for a Fediverse ID. + Currently, the syntax of a Fediverse ID is whatever each implementation supports. + (Which again could be different from each other.) +

+

+ But, having said that, we can infer a minimum syntax for what should be considered a validFediverse ID. + I.e., the syntax that any implmentation for Fediverse IDs should support. + But, to say it explicitly, an implemention for Fediverse IDs could support more than just what is given by this syntax. +

+
+

acct URI

+

+ Part of the process of resolving a Fediverse ID transfomrs a Fediverse ID into an acct URI. + (And then using that acct URI version of the Fediverse ID makes a request to WebFinger.) +

+

+ Here is an example of transforming a Fediverse ID into an acct URI: +

+
+
+     at sign
+       ↓
+       @joeblow@example.com ← Fediverse ID
+
+   acct:joeblow@example.com ← acct URI
+       ↑
+  no at sign
+
+
+

+ A client would then make a request to: +

+
+https://example.com/.well-known/host-meta
+
+

+ To discover what the (template) URL for WebFinger is. + And then, for example, if it is at: +

+
+https://example.com/.well-known/webfinger?resource={uri}
+
+

+ Then make a request to: +

+
+https://example.com/.well-known/webfinger?resource=acct:joeblow@example.com
+
+
+
+

Fediverse ID Syntax

+

+ Inferring from IETF RFC-7565 (The 'acct' URI Scheme) and referenced IEFC RFCs, the syntax of a Fediverse ID is: +

+
+fediverseID = "@" actor "@" host
+
+

+ Where “actor” is defined as: +

+
+actor       = unreserved / sub-delims 0*( unreserved / pct-encoded / sub-delims )
+
+unreserved  = ALPHA / DIGIT / "-" / "." / "_" / "~"
+
+sub-delims  = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
+
+pct-encoded = "%" HEXDIG HEXDIG
+
+ALPHA       =  %x41-5A / %x61-7A   ; A-Z / a-z
+
+DIGIT       =  %x30-39             ; 0-9
+
+HEXDIG      =  DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
+
+

+ (Again note that an implementation could support more characters for “actor” than what is given by this definition.) +

+

+ And “host” is defined as +

+
+host        = IP-literal / IPv4address / reg-name
+
+IP-literal  = "[" ( IPv6address / IPvFuture  ) "]"
+
+IPv6address =                            6( h16 ":" ) ls32
+            /                       "::" 5( h16 ":" ) ls32
+            / [               h16 ] "::" 4( h16 ":" ) ls32
+            / [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
+            / [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
+            / [ *3( h16 ":" ) h16 ] "::"    h16 ":"   ls32
+            / [ *4( h16 ":" ) h16 ] "::"              ls32
+            / [ *5( h16 ":" ) h16 ] "::"              h16
+            / [ *6( h16 ":" ) h16 ] "::"
+
+h16         = 1*4HEXDIG
+
+ls32        = ( h16 ":" h16 ) / IPv4address
+
+IPvFuture   = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" )
+
+IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet
+
+dec-octet   = DIGIT                 ; 0-9
+            / %x31-39 DIGIT         ; 10-99
+            / "1" 2DIGIT            ; 100-199
+            / "2" %x30-34 DIGIT     ; 200-249
+            / "25" %x30-35          ; 250-255
+
+reg-name    = *( unreserved / pct-encoded / sub-delims )
+
+
+
diff --git a/fediverseid.html b/fediverseid.html index 453258c..a6e8fde 100644 --- a/fediverseid.html +++ b/fediverseid.html @@ -8,7 +8,7 @@

- A Fediverse ID is an identifier that conceptually is usually used to point to a person, but also can be conceptually used to point to an application, a group, a organization, a service, or any types of entities. + A Fediverse ID is an identifier that conceptually is usually used to point to a person, but also can be conceptually used to point to an application, a group, a organization, a service, or any other type of entity.

Here are some sample Fediverse IDs: @@ -71,78 +71,9 @@

-

Fediverse ID Syntax

-

- The final say for what is and is not a valid Fediverse IDs are the many implementations of WebFinger in-the-wild. - (Which could be different from each other.) -

-

- But, having said that, what we can infer what an implementation that uses Fediverse IDs should probably support at minimum. - I.e., an implmentation consider more than just this as a valid Fediverse ID — but all these should work. -

-

- Because Fediverse IDs are, from a technical point-of-view, closely tied to acct URI (because of WebFinger) it can affect what is a valid Fediverse ID. -

-

- Inferring from IETF RFC-7565 (The 'acct' URI Scheme), the syntax of a Fediverse ID is: -

-
-fediverseID = "@" actor "@" host
-
-

- Where “actor” is defined as: -

-
-actor       = unreserved / sub-delims 0*( unreserved / pct-encoded / sub-delims )
-
-unreserved  = ALPHA / DIGIT / "-" / "." / "_" / "~"
-
-sub-delims  = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
-
-pct-encoded = "%" HEXDIG HEXDIG
-
-ALPHA       =  %x41-5A / %x61-7A   ; A-Z / a-z
-
-DIGIT       =  %x30-39             ; 0-9
-
-HEXDIG      =  DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
-
-

- (Again note that an implementation could support more characters for “actor” than what is given by this definition.) -

-

- And “host” is defined as -

-
-host        = IP-literal / IPv4address / reg-name
-
-IP-literal  = "[" ( IPv6address / IPvFuture  ) "]"
-
-IPv6address =                            6( h16 ":" ) ls32
-            /                       "::" 5( h16 ":" ) ls32
-            / [               h16 ] "::" 4( h16 ":" ) ls32
-            / [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
-            / [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
-            / [ *3( h16 ":" ) h16 ] "::"    h16 ":"   ls32
-            / [ *4( h16 ":" ) h16 ] "::"              ls32
-            / [ *5( h16 ":" ) h16 ] "::"              h16
-            / [ *6( h16 ":" ) h16 ] "::"
-
-h16         = 1*4HEXDIG
-
-ls32        = ( h16 ":" h16 ) / IPv4address
-
-IPvFuture   = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" )
-
-IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet
-
-dec-octet   = DIGIT                 ; 0-9
-            / %x31-39 DIGIT         ; 10-99
-            / "1" 2DIGIT            ; 100-199
-            / "2" %x30-34 DIGIT     ; 200-249
-            / "25" %x30-35          ; 250-255
-
-reg-name    = *( unreserved / pct-encoded / sub-delims )
-
+

See Also

+
diff --git a/index.html b/index.html index 05c8663..a8081f7 100644 --- a/index.html +++ b/index.html @@ -158,6 +158,7 @@