diff --git a/app/federation/http/page.mdx b/app/federation/http/page.mdx index 43c291c..ac862f5 100644 --- a/app/federation/http/page.mdx +++ b/app/federation/http/page.mdx @@ -21,11 +21,14 @@ ALL kinds of HTTP requests/responses between instances **MUST** include a [Signa Must include `application/json; charset=utf-8`, if the request has a body. - - Request signature, if the request is signed. + + See [Signatures](/signatures) for more information. - - Date and time of the request. + + See [Signatures](/signatures). + + + See [Signatures](/signatures). A string identifying the software making the request. @@ -34,11 +37,12 @@ ALL kinds of HTTP requests/responses between instances **MUST** include a [Signa ```http {{ 'title': 'Example Request' }} - POST /users/1/inbox HTTP/1.1 + POST https://bob.com/users/1/inbox HTTP/1.1 Accept: application/json - Signature: keyId="https://example.com/users/1",algorithm="ed25519",headers="(request-target) host date digest",signature="..." - Date: Thu, 01 Jan 1970 00:00:00 GMT User-Agent: CoolServer/1.0 (https://coolserver.com) + X-Signature: post /users/1/inbox a2ebc29eb6762a9164fbcffc9271e8a53562a5e725e7187ea7d88d03cbe59341 n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg= + X-Signed-By: https://example.com/users/1 + X-Nonce: a2ebc29eb6762a9164fbcffc9271e8a53562a5e725e7187ea7d88d03cbe59341 ``` @@ -51,11 +55,14 @@ ALL kinds of HTTP requests/responses between instances **MUST** include a [Signa Must include `application/json; charset=utf-8`. - - Response signature, if the response is signed. + + See [Signatures](/signatures) for more information. - - Date and time of the response. + + See [Signatures](/signatures). + + + See [Signatures](/signatures). @@ -63,8 +70,9 @@ ALL kinds of HTTP requests/responses between instances **MUST** include a [Signa ```http {{ 'title': 'Example Response' }} HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 - Date: Thu, 01 Jan 1970 00:00:00 GMT - Signature: keyId="https://example.com/users/1",algorithm="ed25519",headers="(request-target) host date digest",signature="..." + X-Signature: get /users/1/followers 8f872d4609d26819d03a7d60ce3db68f5b0dd5a80d5930260294f237e670ab76 YDA64iuZiGG847KPM+7BvnWKITyGyTwHbb6fVYwRx1I + X-Signed-By: https://example.com/users/1 + X-Nonce: 8f872d4609d26819d03a7d60ce3db68f5b0dd5a80d5930260294f237e670ab76 ``` \ No newline at end of file diff --git a/app/signatures/page.mdx b/app/signatures/page.mdx index 6684906..3dd43f4 100644 --- a/app/signatures/page.mdx +++ b/app/signatures/page.mdx @@ -42,6 +42,11 @@ Where: Sign this string using the user's private key. The resulting signature should be encoded in base64. +Example: +``` +post /notes a2ebc29eb6762a9164fbcffc9271e8a53562a5e725e7187ea7d88d03cbe59341 n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg= +``` + ### Verifying the Signature To verify a signature, the server must: