-
Notifications
You must be signed in to change notification settings - Fork 0
ocm: enhance invitation flow #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -355,42 +355,47 @@ paths: | |
| type: string | ||
| schema: | ||
| $ref: "#/definitions/Error" | ||
| /invite/accept: | ||
| /invite/forward: | ||
| post: | ||
| summary: Accept an invite to a shared document | ||
| description: Foo | ||
| summary: Forward an invitation to start sharing | ||
| description: Forwards an invitation received by an out-of-band channel, email for example. | ||
| parameters: | ||
| - name: invite | ||
| in: body | ||
| description: The JSON object to notify OCM that an invite has been accepted. | ||
| description: The JSON object representing an invitation to send to an end-user. | ||
| required: true | ||
| schema: | ||
| $ref: "#/definitions/AcceptInvite" | ||
| $ref: "#/definitions/Invite" | ||
| responses: | ||
| 200: | ||
| description: Auth ok! | ||
| description: Invitation sent. | ||
LovisaLugnegard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 400: | ||
| description: Invalid token? | ||
| description: | | ||
| Bad request due to invalid parameters, e.g. email is not valid. | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should probably remove "email" and maybe put "provider"? |
||
| schema: | ||
| $ref: "#/definitions/Error" | ||
| invite/forward: | ||
| $ref: "#/definitions/400" | ||
| /invite/accept: | ||
| post: | ||
| summary: Forward information from invite to the cloud provider. | ||
| description: Foo | ||
| summary: Accept an invititation to start sharing. | ||
| description: Accepts an invitation to the shared document so the provider can initiate the OCM share creation. | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this description needs to be updated, I'm not sure exactly how though. But isn't this an invitation to be able to share with someone ie in some sense decoupled from the sharing itself, like:
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, you accept the invitation to create a share with the person. Invitation and share creation are both decoupled. We can remove the shared document part. |
||
| parameters: | ||
| - name: invite | ||
| in: body | ||
| description: The JSON object to send to the cloud provider with the invitaiton information. | ||
| description: The JSON object to notify the OCM provider that an invite has been accepted. | ||
| required: true | ||
| schema: | ||
| $ref: "#/definitions/Invite" | ||
| $ref: "#/definitions/AcceptInvite" | ||
| responses: | ||
| 200: | ||
| description: Ok! | ||
| description: Invitation accepted. | ||
| 400: | ||
| description: Invalid token? | ||
| description: The invitation token is invalid. | ||
| schema: | ||
| $ref: "#/definitions/Error" | ||
| 403: | ||
| description: Remote service is not trusted to accept invitations. | ||
| schema: | ||
| $ref: "#/definitions/Error" | ||
| definitions: | ||
| 400: | ||
| type: object | ||
|
|
@@ -547,30 +552,33 @@ definitions: | |
| allOf: | ||
| - properties: | ||
| userId: | ||
| type: string # probably uuid? | ||
| description: Unique ID to identify the person accepting the invite. | ||
| type: string | ||
| description: Unique ID to identify the user at the remote provider accepting the invite. | ||
| example: 9303 | ||
| provider: | ||
| type: string # probably uuid? | ||
| description: Id to identify the provider | ||
| example: abc | ||
| type: string | ||
| format: url | ||
| description: URL of the receiver OCM service. | ||
| example: https://receiver.org/ocm | ||
| token: | ||
| type: string # probably some other kind of token | ||
| type: string | ||
| description: Token received in the invite | ||
| example: abc-123 | ||
| example: xyz | ||
| senderProvider: | ||
| type: string # probably uuid? | ||
| description: Id to identify the provider of the sender | ||
| example: ddd | ||
| type: string | ||
| format: url | ||
| description: URL of the OCM sender service. | ||
| example: https://sender.org/ocm/ | ||
| Invite: | ||
| type: object | ||
| allOf: | ||
| - properties: | ||
| token: | ||
| type: string # probably some other kind of token | ||
| description: Token received in the invite | ||
| example: abc-123 | ||
| type: string | ||
| description: Token generated by the service sending the invitation. | ||
| example: xyz | ||
| senderProvider: | ||
| type: string # probably uuid? | ||
| description: Id to identify the provider of the sender | ||
| example: ddd | ||
| type: string | ||
| format: url | ||
| description: URL of the OCM sender service. | ||
| example: https://sender.org/ocm/ | ||
Uh oh!
There was an error while loading. Please reload this page.