Skip to content

Commit 0f737cc

Browse files
authored
Document share access (#72)
1 parent 28a5cd4 commit 0f737cc

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ the [OpenAPI](https://github.com/OAI/OpenAPI-Specification) (fka Swagger) specif
1010
* [Discovery](#discovery)
1111
* [Share Creation](#create)
1212
* [Share Acceptance](#accept)
13+
* [Share Access](#access)
1314
* [Share Deletion](#unshare)
1415
* [Share Updating](#update)
1516
* [Resharing](#reshare)
1617
* [Invite](#invite)
17-
18+
1819
* [Contributing](#contributing)
1920

2021
## Scope and assumptions
@@ -41,6 +42,13 @@ To create a share, the sending server SHOULD make a HTTP POST request to the `/s
4142
### Share Acceptance
4243
In response to a share creation, the receiving server MAY send back a [notification](https://cs3org.github.io/OCM-API/docs.html?branch=develop&repo=OCM-API&user=cs3org#/paths/~1notifications/post) to the sending server, with `notificationType` set to `"SHARE_ACCEPTED"` or `"SHARE_DECLINED"`. The sending server MAY expose this information to the end user.
4344

45+
### Share Access
46+
To access a share, the receiving server MAY use multiple ways, depending on the received payload and on the `protocol.name` property:
47+
48+
* If `protocol.name` = `multi`, the receiver SHOULD make a HTTP PROPFIND request to `protocol.webdav.uri` to access the remote resource. If `protocol.webdav.sharedSecret` is not empty, the receiver SHOULD pass it as a `Authorization: bearer` header.
49+
50+
* If `protocol.name` = `webdav`, the receiver SHOULD inspect the `protocol.options` property. If it contains a `sharedSecret`, as in the [legacy example](https://cs3org.github.io/OCM-API/docs.html?branch=develop&repo=OCM-API&user=cs3org#/paths/~1shares/post), then the receiver SHOULD make a HTTP PROPFIND request to `https://<token>:@<host><path>/<rel_path>`, where: `<host>` is the remote server, `<path>` is obtained by querying the [Discovery](#discovery) endpoint and extracting `resourceTypes[0].protocols.webdav`, and optionally `<rel_path>` is the relative path of the resource within the share, when needed.
51+
4452
### Share Deletion
4553
A `"SHARE_ACCEPTED"` notification followed by a `"SHARE_UNSHARED"` notification is
4654
equivalent to a `"SHARE_DECLINED"` notification.
@@ -73,7 +81,6 @@ The specification can be rendered as HTML documentation using [ReDoc](https://gi
7381
* [version 1.0](https://cs3org.github.io/OCM-API/docs.html?branch=v1.0.0&repo=OCM-API&user=cs3org#/paths/~1shares/post), current official and supported version
7482
* [develop branch](https://cs3org.github.io/OCM-API/docs.html?branch=develop&repo=OCM-API&user=cs3org), future version supported by ScienceMesh
7583

76-
7784
The Open Cloud Mesh API specification is an open source, community-driven project. If you'd like to contribute, please follow the [Contributing Guidelines](CONTRIBUTING.md).
7885

7986
To stage the changes of your PR, you can change the repo and branch in the URL.

0 commit comments

Comments
 (0)