From 123a07f049c6b5ec0b62cf65d894c8c09d8804bb Mon Sep 17 00:00:00 2001 From: Michiel de Jong Date: Thu, 5 Sep 2024 14:32:32 +0200 Subject: [PATCH] response codes --- README.md | 7 ++++++- spec.yaml | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6657aad..6f9f3db 100644 --- a/README.md +++ b/README.md @@ -151,9 +151,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. diff --git a/spec.yaml b/spec.yaml index 664c7bf..a076ea4 100644 --- a/spec.yaml +++ b/spec.yaml @@ -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"