Skip to content

Commit

Permalink
Explicitly mark invite flow attributes as required (#148)
Browse files Browse the repository at this point in the history
* add: optional and required fields to invite flow

* mark all attributes in invite flow as required

* add: optional and required fields to invite flow

* mark all attributes in invite flow as required

* add: required fields in the IETF-RFC invite flow
  • Loading branch information
MahdiBaghbani authored Oct 17, 2024
1 parent cbeb415 commit 17d7710
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 45 deletions.
16 changes: 8 additions & 8 deletions IETF-RFC.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ Whereas the precise syntax of the Invite Message and the Invite Acceptance Gestu
* to the `/invited-accepted` path in the Invite Sender OCM Server's OCM API
* using `application/json` as the `Content-Type` HTTP request header
* its request body containing a JSON document representing an object with the following string fields:
* `recipientProvider` - FQDN of the Invite Receiver OCM Server
* `token` - the Invite Token. The Invite Sender OCM Server SHOULD recall which Invite Sender OCM Address this token was linked to
* `userID` - the Invite Receiver's identifier at their OCM Server
* `email` - non-normative / informational; an email address for the Invite Receiver. Not necessarily at the same FQDN as their OCM Server
* `name` - human-readable name of the Invite Receiver, as a suggestion for display in the Invite Sender's address book
* REQUIRED: `recipientProvider` - FQDN of the Invite Receiver OCM Server
* REQUIRED: `token` - the Invite Token. The Invite Sender OCM Server SHOULD recall which Invite Sender OCM Address this token was linked to
* REQUIRED: `userID` - the Invite Receiver's identifier at their OCM Server
* REQUIRED: `email` - non-normative / informational; an email address for the Invite Receiver. Not necessarily at the same FQDN as their OCM Server
* REQUIRED: `name` - human-readable name of the Invite Receiver, as a suggestion for display in the Invite Sender's address book
* using TLS
* using [httpsig](https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures-12)

Expand All @@ -157,9 +157,9 @@ The Invite Acceptance Response SHOULD be a HTTP response:
* in response to the Invite Acceptance Request
* using `application/json` as the `Content-Type` HTTP response header
* its response body containing a JSON document representing an object with the following string fields:
* `userID` - the Invite Sender's identifier at their OCM Server
* `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
* REQUIRED: `userID` - the Invite Sender's identifier at their OCM Server
* REQUIRED: `email` - non-normative / informational; an email address for the Invite Sender. Not necessarily at the same FQDN as their OCM Server
* REQUIRED: `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.
Expand Down
82 changes: 45 additions & 37 deletions spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -690,45 +690,53 @@ definitions:
providerId: "51dc30ddc473d43a6011e9ebba6ca770"
AcceptedInvite:
type: object
allOf:
- properties:
recipientProvider:
type: string
format: fqdn
description: FQDN of the receiver OCM service.
example: receiver.org
token:
type: string
description: Token received in the invite
example: xyz
userID:
type: string
description: Unique ID to identify the Invite Receiver at their OCM Server.
example: 51dc30ddc473d43a6011e9ebba6ca770
email:
type: string
description: Email address of the Invite Receiver.
example: [email protected]
name:
type: string
description: Name of the Invite Receiver.
example: Richard Feynman
required:
- recipientProvider
- token
- userID
- email
- name
properties:
recipientProvider:
type: string
format: fqdn
description: FQDN of the receiver OCM service.
example: receiver.org
token:
type: string
description: Token received in the invite
example: xyz
userID:
type: string
description: Unique ID to identify the Invite Receiver at their OCM Server.
example: 51dc30ddc473d43a6011e9ebba6ca770
email:
type: string
description: Email address of the Invite Receiver.
example: [email protected]
name:
type: string
description: Name of the Invite Receiver.
example: Richard Feynman
AcceptedInviteResponse:
type: object
allOf:
- properties:
userID:
type: string
description: Unique ID to identify the Invite Sender at their OCM Server.
example: 9302
email:
type: string
description: Email ID of the Invite Sender.
example: [email protected]
name:
type: string
description: Name of the Invite Sender.
example: John Doe
required:
- userID
- email
- name
properties:
userID:
type: string
description: Unique ID to identify the Invite Sender at their OCM Server.
example: 9302
email:
type: string
description: Email ID of the Invite Sender.
example: [email protected]
name:
type: string
description: Name of the Invite Sender.
example: John Doe
TokenRequest:
type: object
properties:
Expand Down

0 comments on commit 17d7710

Please sign in to comment.