Skip to content

Commit

Permalink
response codes
Browse files Browse the repository at this point in the history
  • Loading branch information
michielbdejong committed Sep 6, 2024
1 parent c6f14ce commit dfc3984
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,14 @@ The Invite Acceptance Response SHOULD be a HTTP response:
* `email` - non-normative / informational; an email address for the Invite Sender. Not necessarily at the same FQDN as their OCM Server
* `name` - human-readable name of the Invite Sender, as a suggestion for display in the Invite Receiver's address book

A 200 response status means the Invitation Acceptance Request was successful.
A 400 response status means the Invitation Token is invalid or does not exist.
A 403 response status means the Invite Receiver OCM Server is not trusted to accept this Invite.
A 409 response status means the Invite was already accepted.

The Invite Sender OCM Server SHOULD verify the HTTP Signature on the Invite Acceptance Request and apply its own policies for trusting the Invite Receiver OCM Server before processing the Invite Acceptance Request and sending the Invite Acceptance Response.

As with the `userID` in the Invite Acceptance Request, the one in the Response also doesn't need to be human-memorable, doesn't need to match the Invite Sender's username at their OCM Server
As with the `userID` in the Invite Acceptance Request, the one in the Response also doesn't need to be human-memorable, doesn't need to match the Invite Sender's username at their OCM Server.

##### Addition into address books
Following these step, both servers MAY display the `name` of the other party as a trusted or allowlisted contact, and enable selecting them as a Receiving Party. OCM Servers MAY enforce a policy to only accept Share Creation Notifications from such trusted contacts, or MAY display a warning to users when a Share Creation Notification from an unknown party is received.
Expand Down
8 changes: 4 additions & 4 deletions spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,19 +219,19 @@ paths:
$ref: "#/definitions/AcceptedInvite"
responses:
200:
description: Invitation accepted.
description: Invitation Acceptance Request successful (see [Invite Acceptance Response](https://github.com/cs3org/OCM-API/tree/internet-draft-format?tab=readme-ov-file#invite-acceptance-response-details))
schema:
$ref: "#/definitions/AcceptedInviteResponse"
400:
description: The invitation token is invalid or does not exist.
description: The Invitation Token is invalid or does not exist (see [Invite Acceptance Response](https://github.com/cs3org/OCM-API/tree/internet-draft-format?tab=readme-ov-file#invite-acceptance-response-details))
schema:
$ref: "#/definitions/Error"
403:
description: Remote service is not trusted to accept invitations.
description: Invite Receiver OCM Server is not trusted to accept this Invite (see [Invite Acceptance Response](https://github.com/cs3org/OCM-API/tree/internet-draft-format?tab=readme-ov-file#invite-acceptance-response-details))
schema:
$ref: "#/definitions/Error"
409:
description: Invitation already accepted.
description: Invitation already accepted (see [Invite Acceptance Response](https://github.com/cs3org/OCM-API/tree/internet-draft-format?tab=readme-ov-file#invite-acceptance-response-details))
schema:
$ref: "#/definitions/Error"
/token:
Expand Down

0 comments on commit dfc3984

Please sign in to comment.