Skip to content

Commit 7e4811d

Browse files
authored
docs: Add InviteWitness activity to spec (#7)
Signed-off-by: Bob Stasyszyn <[email protected]>
1 parent 53961ff commit 7e4811d

File tree

1 file changed

+104
-2
lines changed

1 file changed

+104
-2
lines changed

index.html

Lines changed: 104 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,7 @@ <h4>Follow Activity</h4>
11931193
</section>
11941194

11951195
<section class="normative">
1196-
<h4>Accept Activity</h4>
1196+
<h4>Accept Follow Activity</h4>
11971197
<p>
11981198
An Orb Server accepts a Follow request by sending an HTTP POST of a <i>Accept</i> activity to the requesting Orb Server's ActivityPub inbox endpoint.
11991199
Refer to <a href="https://www.w3.org/TR/activitypub/#accept-activity-inbox">ActivityPub</a> for guidance.
@@ -1226,7 +1226,7 @@ <h4>Accept Activity</h4>
12261226
</section>
12271227

12281228
<section class="normative">
1229-
<h4>Reject Activity</h4>
1229+
<h4>Reject Follow Activity</h4>
12301230
<p>
12311231
An Orb Server rejects a Follow request by sending an HTTP POST of a <i>Reject</i> activity to the requesting Orb Server's ActivityPub inbox endpoint.
12321232
Refer to <a href="https://www.w3.org/TR/activitypub/#reject-activity-inbox">ActivityPub</a> for guidance.
@@ -1263,6 +1263,108 @@ <h4>Reject Activity</h4>
12631263
<section class="normative" id='witness-activitypub'>
12641264
<h3>Witness ActivityPub</h3>
12651265

1266+
<section class="normative">
1267+
<h4>InviteWitness Activity</h4>
1268+
<p>
1269+
An Orb Server invites another Orb Server to be a witness by performing an HTTP POST of an <i>InviteWitness</i> activity to its ActivityPub inbox endpoint.
1270+
</p>
1271+
1272+
<pre class="example highlight" title="Request to invite an Orb Server to be a witness">
1273+
POST /services/orb/inbox HTTP/1.1
1274+
Host: alice.example.com
1275+
Content-Type: application/ld+json; profile="https://www.w3.org/ns/activitystreams"
1276+
Accept-Encoding: gzip, deflate
1277+
1278+
{
1279+
"@context": [
1280+
"https://www.w3.org/ns/activitystreams",
1281+
"https://trustbloc.github.io/did-method-orb/contexts/anchor/v1"
1282+
],
1283+
"id": "https://sally.example.com/activities/7052018f-9530-3aef-8a46-20bde9445a21",
1284+
"type": "InviteWitness",
1285+
"to": "https://alice.example.com/services/orb",
1286+
"actor": "https://sally.example.com/services/orb"
1287+
}
1288+
</pre>
1289+
1290+
<p>
1291+
On success, HTTP status code 200 is returned.
1292+
</p>
1293+
</section>
1294+
1295+
<section class="normative">
1296+
<h4>Accept InviteWitness Activity</h4>
1297+
<p>
1298+
An Orb Server accepts an InviteWitness request by sending an HTTP POST of a <i>Accept</i> activity to the requesting Orb Server's ActivityPub inbox endpoint.
1299+
Upon receiving this activity, the requesting Orb Server adds the actor to its collection of 'witnesses'.
1300+
Refer to <a href="https://www.w3.org/TR/activitypub/#accept-activity-inbox">ActivityPub</a> for guidance.
1301+
</p>
1302+
1303+
<pre class="example highlight" title="Accept invite witness request from an Orb Server">
1304+
POST /services/orb/inbox HTTP/1.1
1305+
Host: sally.example.com
1306+
Content-Type: application/ld+json; profile="https://www.w3.org/ns/activitystreams"
1307+
Accept-Encoding: gzip, deflate
1308+
1309+
{
1310+
"@context": [
1311+
"https://www.w3.org/ns/activitystreams",
1312+
"https://trustbloc.github.io/did-method-orb/contexts/anchor/v1"
1313+
],
1314+
"id": "https://alice.example.com/activities/f017e49a-7256-44a0-255d-3dc304ae67f7",
1315+
"to": "https://sally.example.com/services/orb",
1316+
"type": "Accept",
1317+
"actor": "https://alice.example.com/services/orb",
1318+
"object": {
1319+
"id": "https://sally.example.com/activities/7052018f-9530-3aef-8a46-20bde9445a21",
1320+
"to": "https://alice.example.com/services/orb",
1321+
"type": "InviteWitness",
1322+
"actor": "https://sally.example.com/services/orb",
1323+
}
1324+
}
1325+
</pre>
1326+
1327+
<p>
1328+
On success, HTTP status code 200 is returned.
1329+
</p>
1330+
</section>
1331+
1332+
<section class="normative">
1333+
<h4>Reject InviteWitness Activity</h4>
1334+
<p>
1335+
An Orb Server rejects an InviteWitness request by sending an HTTP POST of a <i>Reject</i> activity to the requesting Orb Server's ActivityPub inbox endpoint.
1336+
Refer to <a href="https://www.w3.org/TR/activitypub/#reject-activity-inbox">ActivityPub</a> for guidance.
1337+
</p>
1338+
1339+
<pre class="example highlight" title="Reject invite witness request from an Orb Server">
1340+
POST /services/orb/inbox HTTP/1.1
1341+
Host: sally.example.com
1342+
Content-Type: application/ld+json; profile="https://www.w3.org/ns/activitystreams"
1343+
Accept-Encoding: gzip, deflate
1344+
1345+
{
1346+
"@context": [
1347+
"https://www.w3.org/ns/activitystreams",
1348+
"https://trustbloc.github.io/did-method-orb/contexts/anchor/v1"
1349+
],
1350+
"id": "https://alice.example.com/activities/b013e49a-6256-24a0-855d-1dc304ar67f7",
1351+
"to": "https://sally.example.com/services/orb",
1352+
"type": "Reject",
1353+
"actor": "https://alice.example.com/services/orb",
1354+
"object": {
1355+
"id": "https://sally.example.com/activities/7052018f-9530-3aef-8a46-20bde9445a21",
1356+
"to": "https://alice.example.com/services/orb",
1357+
"type": "InviteWitness",
1358+
"actor": "https://sally.example.com/services/orb",
1359+
}
1360+
}
1361+
</pre>
1362+
1363+
<p>
1364+
On success, HTTP status code 200 is returned.
1365+
</p>
1366+
</section>
1367+
12661368
<section class="normative">
12671369
<h4>Offer Activity</h4>
12681370

0 commit comments

Comments
 (0)