diff --git a/fep/3b86/fep-3b86.md b/fep/3b86/fep-3b86.md index 10f8b95..6e76159 100644 --- a/fep/3b86/fep-3b86.md +++ b/fep/3b86/fep-3b86.md @@ -32,7 +32,7 @@ What is needed is a systematic way for each server to announce the endpoint URLs ## 3. Activity Intents In the most basic terms, Activity Intents expand on the common Fediverse use of [WebFinger](https://webfinger.net) in [FEP-4adb](https://w3id.org/fep/4adb) to include mappings between any [Activity Type](https://www.w3.org/TR/activitystreams-vocabulary/#activity-types) and the URL endpoint where that user can perform it. This expands and standardizes the "remote follow" workflow that was used by oStatus protocol, but has not been fully implemented by newer Fediverse applications and no longer has a public specification document. -When generating a WebFinger result for a user account, servers supporting Activity Intents SHOULD respond with one or more intent links in the ["links" property](https://datatracker.ietf.org/doc/html/rfc7033#section-4.4.4). Activity Intent links MUST have `rel` and `href` properties. All others properties are ignored. +When generating a WebFinger result for a user account, servers supporting Activity Intents SHOULD respond with one or more intent links in the ["links" property](https://datatracker.ietf.org/doc/html/rfc7033#section-4.4.4). Activity Intent links MUST have `rel` and `template` properties. All others properties are ignored. ### 3.1. Example Here is an example response from a WebFinger server which includes three Activity Intents appended to the end of its `links` property. @@ -61,11 +61,11 @@ Here is an example response from a WebFinger server which includes three Activit }, { "rel": "https://w3id.org/fep/3b86/Follow", - "href": "https://mastodon.social/authorize_interaction?uri={object}" + "template": "https://mastodon.social/authorize_interaction?uri={object}" }, { "rel": "https://w3id.org/fep/3b86/Create", - "href": "https://mastodon.social/share?uri={object}" + "template": "https://mastodon.social/share?uri={object}" }, { "rel": "https://w3id.org/fep/3b86/Like", @@ -79,7 +79,7 @@ Here is an example response from a WebFinger server which includes three Activit **rel**: Activity Intents use the `https://w3id.org/fep/3b86/*` (as described in [FEP-888d](https://w3id.org/fep/8886)) to designate the kind of activity intent, where `*` represents the particular Activity the user intends to perform. These relations -- such as `https://w3id.org/fep/3b86/Follow`, and `https://w3id.org/fep/3b86/Create` -- are listed in detail below. -**href**: Links also use the standard WebFinger `href` property, but also include wrapped replace values (as in `{uri}` or `{name}`) to designate parameters to be injected by the caller. (note: this is in contrast to the non-standard `template` property that was used by oStatus) +**template**: Links use [URI Templates](https://datatracker.ietf.org/doc/html/rfc6570) as used in [RFC-6415](https://datatracker.ietf.org/doc/html/rfc6415#section-3.1.1) to designate URLS and parameters to be injected by the caller -- as in `{uri}` or `{name}` values. Note: WebFinger does not specify the `template` parameter, but it is used here because 1) there's a semantic benefit in identifying values not a _links_, but as _link templates_, and 2) it is already in use by oStatus, which should make it familiar to Fediverse developers. Parameter names are chosen to correspond with [Activity Vocabulary properties](https://www.w3.org/TR/activitystreams-vocabulary/#properties) and may differ from parameters used by pre-existing implementations. @@ -90,7 +90,7 @@ To prevent unrecognized properties from corrupting a workflow: ### 3.3 Template Parameters In all cases, Activity Intents intentionally use the property names defined in the W3C standard [Activity Vocabulary](https://www.w3.org/TR/activitystreams-vocabulary). However, intents must fit into a URL, and must use commonly understood fields. So, Intent parameters can only use IDs -- URL references to JSON-LD resources available elsewhere on the Internet. -In addition, remote servers MUST [Percent Encode](https://datatracker.ietf.org/doc/html/rfc3986#section-2.1) all values replaced in the href template. +In addition, remote servers MUST [Percent Encode](https://datatracker.ietf.org/doc/html/rfc3986#section-2.1) all values replaced in the URI Template. ### 3.4 Workflow Actions Activity Intents MAY include additional query parameters `on-success` and `on-cancel` that allow home servers to return users to their original workflow on the remote server: @@ -129,14 +129,14 @@ The Accept intent publishes the API endpoint where the current user can "accept" #### 4.1.1. Parameters * `{object}` - ID of the object that the user will accept when they use this workflow. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform they abort the workflow. #### 4.1.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Accept", - "href": "https://server.org/intents/accept?objectId={object}" + "template": "https://server.org/intents/accept?objectId={object}" } ``` @@ -148,14 +148,14 @@ The Add intent publishes the API endpoint where the current user can add an obje #### 4.2.1. Parameters * `{object}` ID of the object that the user will add when they use this workflow. * `{target}` ID of the collection being added to. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.2.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Add", - "href": "https://server.org/intents/add?objectId={object}&targetId={target}" + "template": "https://server.org/intents/add?objectId={object}&targetId={target}" } ``` @@ -166,14 +166,14 @@ The Announce intent publishes the API endpoint where the current user can announ #### 4.3.1. Parameters * `{object}` - ID of the document that the user will boost when they use this workflow. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.3.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Announce", - "href": "https://server.org/intents/announce?objectId={object}" + "template": "https://server.org/intents/announce?objectId={object}" } ``` @@ -184,14 +184,14 @@ The Arrive intent publishes the API endpoint where the current user can indicate #### 4.4.1. Parameters * `{location}` - ID of the location object where the user will mark as "arrived" when they use this workflow. - * `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. + * `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.4.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Arrive", - "href": "https://server.org/intents/arrive?hotelId={location}" + "template": "https://server.org/intents/arrive?hotelId={location}" } ``` @@ -202,14 +202,14 @@ The Block intent publishes the API endpoint where the current user can block the #### 4.5.1. Parameters * `{object}` - ID of the object (document, user, etc) that the user will block when they use this workflow. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.5.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Block", - "href": "https://server.org/intents/block?userId={object}" + "template": "https://server.org/intents/block?userId={object}" } ``` @@ -228,14 +228,14 @@ This Intent differs slightly from others in that it does not take IDs/URLs of ot * `{name}` - (optional) Name to pre-populate into the created object. * `{summary}` - (optional) Summary to pre-populate into the created object. * `{inReplyTo}` - (optional)The ID of the ActivityStreams Document that the user is replying to. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.6.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Create", - "href": "https://mastodon.social/share?text={content}" + "template": "https://mastodon.social/share?text={content}" } ``` @@ -247,14 +247,14 @@ The Delete intent publishes the API endpoint where the current user can initiate #### 4.7.1. Parameters * `{object}` - ID of the object that the user will delete when they use this workflow. * `{origin}`- (optional) ID of the collection or context that the object will be deleted from. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.7.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Delete", - "href": "https://server.org/intents/Delete?objectId={object}" + "template": "https://server.org/intents/Delete?objectId={object}" } ``` @@ -265,15 +265,15 @@ The Dislike intent publishes the API endpoint where the current user can initiat #### 4.8.1. Parameters * `{object}` - ID of the document that the user will dislike when they use this workflow. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.8.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Dislike", - "href": "https://server.org/intent/dislike?objectId={object}" + "template": "https://server.org/intent/dislike?objectId={object}" } ``` @@ -284,14 +284,14 @@ The Flag intent publishes the API endpoint where the current user can initiate a #### 4.9.1. Parameters * `{object}` - ID of the object (document, user, etc) that the user will flag when they use this workflow. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.9.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Flag", - "href": "https://server.org/intent/flag?objectId={object}" + "template": "https://server.org/intent/flag?objectId={object}" } ``` @@ -302,14 +302,14 @@ The Follow intent publishes the API endpoint where the current user can initiate #### 4.10.1. Parameters * `{object}` - ID of the actor that the user will follow when they use this workflow. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.10.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Follow", - "href": "https://mastodon.social/authorize_interaction?uri={object}" + "template": "https://mastodon.social/authorize_interaction?uri={object}" } ``` @@ -320,14 +320,14 @@ The Ignore intent publishes the API endpoint where the current user can initiate #### 4.11.1 Parameters * `{object}` - ID of the object that the user will mark "ignored" when they use this workflow. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.11.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Ignore", - "href": "https://server.org/intents/ignore?objectId={object}" + "template": "https://server.org/intents/ignore?objectId={object}" } ``` @@ -339,14 +339,14 @@ The Invite intent publishes the API endpoint where the current user can initiate #### 4.12.1. Parameters * `{target}` - ID of the actor who will receive the invitation. * `{object}` - ID of the object (event, group, etc) that the actor will be invited to. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.12.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Invite", - "href": "https://server.org/intents/invite?actorId={object}&eventId={target}" + "template": "https://server.org/intents/invite?actorId={object}&eventId={target}" } ``` @@ -357,14 +357,14 @@ The Join intent publishes the API endpoint where the current user can initiate a #### 4.13.1. Parameters * `{object}` - ID of the object that the user will join when they use this workflow. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.13.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Join", - "href": "https://server.org/intents/join?objectId={object}" + "template": "https://server.org/intents/join?objectId={object}" } ``` @@ -375,14 +375,14 @@ The Leave intent publishes the API endpoint where the current user can initiate #### 4.14.1. Parameters * `{object}` - ID of the object that the user will leave when they use this workflow. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.14.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Leave", - "href": "https://server.org/intents/leave?objectId={object}" + "template": "https://server.org/intents/leave?objectId={object}" } ``` @@ -393,14 +393,14 @@ The Like intent publishes the API endpoint where the current user can like the c #### 4.15.1. Parameters * `{object}` - ID of the object that the user will mark as "liked" when they use this workflow. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.15.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Like", - "href": "https://server.com/intents/like?objectId={object}" + "template": "https://server.com/intents/like?objectId={object}" } ``` @@ -411,14 +411,14 @@ The Listen intent publishes the API endpoint where the current user can initiate #### 4.16.1. Parameters * `{object}` - ID of the object that the user will mark as "listened" to when they use this workflow. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.16.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Listen", - "href": "https://server.org/intents/listen?objectId={object}" + "template": "https://server.org/intents/listen?objectId={object}" } ``` @@ -431,14 +431,14 @@ The Move intent publishes the API endpoint where the current user can initiate a * `{object}` - ID of the object that the user will move when they use this workflow. * `{target}` - ID of the collection that the object will be moved to. * `{origin}` - (optional) ID of the collection that the object will be moved from. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.17.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Move", - "href": "https://server.org/intents/move?objectId={object}&destId={target}" + "template": "https://server.org/intents/move?objectId={object}&destId={target}" } ``` @@ -450,14 +450,14 @@ The Offer intent publishes the API endpoint where the current user can initiate #### 4.18.1. Parameters * `{object}` - ID of the object that the user will offer when they use this workflow. * `{target}` - ID of the actor that will receive the offer. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.18.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Offer", - "href": "https://server.org/intents/offer?objectId={object}&to={target}" + "template": "https://server.org/intents/offer?objectId={object}&to={target}" } ``` @@ -468,14 +468,14 @@ The Question intent publishes the API endpoint where the current user can initia #### 4.19.1. Parameters * `{name}` - The "name" property to pre-populate into the question the user will ask when they use this workflow. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.19.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Question", - "href": "https://server.org/intents/question?name={name}" + "template": "https://server.org/intents/question?name={name}" } ``` @@ -486,14 +486,14 @@ The Read intent publishes the API endpoint where the current user can initiate a #### 4.20.1. Parameters * `{object}` - ID of the object that the user will mark as "read" when they use this workflow. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.20.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Read", - "href": "https://server.org/intents/object?objectId={object}" + "template": "https://server.org/intents/object?objectId={object}" } ``` @@ -504,14 +504,14 @@ The Reject intent publishes the API endpoint where the current user can initiate #### 4.21.1. Parameters * `{object}` - ID of the object that the user will reject when they use this workflow. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.21.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Reject", - "href": "https://server.org/intents/reject?offerId={object}" + "template": "https://server.org/intents/reject?offerId={object}" } ``` @@ -523,14 +523,14 @@ The Remove intent publishes the API endpoint where the current user can initiate #### 4.22.1. Parameters * `{object}` - ID of the object that the user will remove when they use this workflow. * `{target}` - (optional) The ID of the collection that the object will be removed from. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.22.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Reject", - "href": "https://server.org/intents/reject?objectId={object}" + "template": "https://server.org/intents/reject?objectId={object}" } ``` @@ -541,14 +541,14 @@ The TentativeAccept intent publishes the API endpoint where the current user can #### 4.23.1. Parameters * `{object}` - ID of the object that the user will tentatively accept when they use this workflow. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.23.2. Example ```json { "rel": "https://w3id.org/fep/3b86/TentativeAccept", - "href": "https://server.org/intents/tentativeAccept?objectId={object}" + "template": "https://server.org/intents/tentativeAccept?objectId={object}" } ``` @@ -559,14 +559,14 @@ The TentativeReject intent publishes the API endpoint where the current user can #### 4.24.1. Parameters * `{object}` - ID of the object that the user will tentatively reject when they use this workflow. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.24.2. Example ```json { "rel": "https://w3id.org/fep/3b86/TentativeReject", - "href": "https://server.org/intents/tentativeReject?objectId={object}" + "template": "https://server.org/intents/tentativeReject?objectId={object}" } ``` @@ -578,14 +578,14 @@ The Travel intent publishes the API endpoint where the user can initiate a "trav #### 4.25.1. Parameters * `{target}` - (optional) The ID of the location that the actor will travel to. * `{origin}` - (optional) The ID of the location that the actor will travel from. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.25.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Travel", - "href": "https://server.org/intents/travel?from={origin}&to={target}" + "template": "https://server.org/intents/travel?from={origin}&to={target}" } ``` @@ -596,14 +596,14 @@ The Undo intent publishes the API endpoint where the current user can initiate a #### 4.26.1. Parameters * `{object}` - ID of the activity that the actor will undo. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. * `{on-cancel}` - (optional) URL to redirect users if they abort the workflow. #### 4.26.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Undo", - "href": "https://server.org/intents/undo?activityId={object}" + "template": "https://server.org/intents/undo?activityId={object}" } ``` @@ -614,14 +614,14 @@ The Update intent publishes the API endpoint where the user can initiate an "upd #### 4.27.1. Parameters * `{object}` - ID of the object that the actor will update when they use this workflow. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.27.2. Example ```json { "rel": "https://w3id.org/fep/3b86/Update", - "href": "https://server.org/intents/update?objectId={object}" + "template": "https://server.org/intents/update?objectId={object}" } ``` @@ -632,18 +632,18 @@ The View intent publishes the API endpoint where the current user can initiate a #### 4.28.1. Parameters * `{object}` - ID of the object that the actor will mark as "viewed" when they use this workflow. -* `{on-success}` - (optional) URL to redirect the user to after the workflow completes. -* `{on-cancel}` - (optional) URL to redirect the user to if they abort the workflow. +* `{on-success}` - (optional) Workflow action to perform after the workflow completes. +* `{on-cancel}` - (optional) Workflow action to perform if the user aborts the workflow. #### 4.28.2. Example ```json { "rel": "https://w3id.org/fep/3b86/View", - "href": "https://server.org/intents/view?objectId={object}" + "template": "https://server.org/intents/view?objectId={object}" } ``` -## 5.0. Security Considerations +## 5.0. Security Considerations ### 5.1 CSRF issues It is important to reiterate some key security practices to prevent [Cross Site Request Forgery](https://en.wikipedia.org/wiki/Cross-site_request_forgery) vulnerabilities. @@ -673,7 +673,7 @@ Here is a brief example of the workflow as implemented by a remote server: 4. The remote server uses a standard WebFinger query to look up the user's Fediverse ID and searches for Activity Intents supported by the user's home server. 1. If none are found, the remote server MAY try to substitute fallback values for known server types. 2. If none are found (and no fallbacks substituted) the remote server SHOULD inform the user that their account is incompatible with the selected feature and halt the workflow. -5. The remote server replaces values into the designated href template and forwards the user to the assigned page on their home server. This initiates the Activity Intent workflow on their home server. +5. The remote server replaces values into the designated URI Template and forwards the user to the assigned page on their home server. This initiates the Activity Intent workflow on their home server. 6. When the user completes the workflow, the home server SHOULD use URL in the `on-success` parameter to redirect the user back to the correct page on the remote server. 1. Similarly, if the user cancels the workflow, the home server SHOULD use the URL in the `on-cancel` parameter to redirect the user back to the correct page on the remote server. @@ -695,6 +695,8 @@ Remote servers MAY also account for applications that do not publish Activity In * [IETF RFC 7033](https://datatracker.ietf.org/doc/html/rfc7033) - WebFinger * [IETF RFC 3896](https://datatracker.ietf.org/doc/html/rfc3986#section-2.1) - Uniform Resource Identifier Generic Syntax * [IEFT RFC 2119](https://tools.ietf.org/html/rfc2119.html) - Key words for use in RFCs to Indicate Requirement Levels +* [IETF RFC 6415](https://datatracker.ietf.org/doc/html/rfc6415) - Web Host Metadata +* [IEFT RFC-6570](https://datatracker.ietf.org/doc/html/rfc6570) - URI Template * [Unvalidated Redirects and Forwards Cheat Sheet - owasp.org](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html#preventing-unvalidated-redirects-and-forwards)) * [OAuth 2.0 Security Best Current Practice](https://www.ietf.org/archive/id/draft-ietf-oauth-security-topics-27.html)