Skip to content

Commit fc92394

Browse files
committed
Attempt to force white spaces. Fixes #328
1 parent 0cdf55d commit fc92394

File tree

1 file changed

+48
-41
lines changed

1 file changed

+48
-41
lines changed

IETF-RFC.md

Lines changed: 48 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -689,18 +689,18 @@ contain the following information about its OCM API:
689689
`"federation"`.
690690
Example: `["user"]`
691691
- protocols (object) - The supported protocols for accessing Shared
692-
Resources of this type.
693-
Implementations that offer `file` Resources MUST
694-
support at least `webdav`,
695-
any other combination of Resources and protocols is
696-
optional. Example:
697-
```json
692+
Resources of this type. Implementations that offer `file`
693+
Resources MUST support at least `webdav`, any other combination
694+
of Resources and protocols is optional. Example:
695+
696+
```
698697
{
699698
"webdav": "/remote/dav/ocm/",
700699
"webapp": "/app/ocm/",
701700
"talk": "/apps/spreed/api/"
702701
}
703702
```
703+
{: type="json"}
704704
Fields:
705705
- webdav (string) - The top-level WebDAV [RFC4918] path at this
706706
endpoint. In order to access a Remote Resource, implementations
@@ -1136,7 +1136,7 @@ request payload MUST be in `x-www-form-urlencoded` form, as shown
11361136
in the following example (with line breaks in the Signature headers
11371137
for display purposes only):
11381138

1139-
```
1139+
<sourcecode type="http">
11401140
POST {tokenEndPoint} HTTP/1.1
11411141
Host: cloud.example.org
11421142
Date: Wed, 05 Nov 2025 14:00:00 GMT
@@ -1154,7 +1154,7 @@ Signature: sig1=:bM2sV2a4oM8pWc4Q8r9Zb8bQ7a2vH1kR9xT0yJ3uE4wO5lV6bZ1cP
11541154
grant_type=authorization_code&
11551155
client_id=receiver.example.org&
11561156
code=my_secret_code
1157-
```
1157+
</sourcecode>
11581158

11591159
The request MUST be signed using an HTTP Message Signature
11601160
[RFC9421]. The `client_id` identifies the Receiving Server and MUST be
@@ -1177,6 +1177,7 @@ containing the issued token:
11771177
"expires_in": 300
11781178
}
11791179
```
1180+
{: type="json"}
11801181

11811182
The `access_token` is an opaque bearer credential with no internal
11821183
structure visible to the Receiving Server. The token authorizes the
@@ -1192,9 +1193,11 @@ then be used in the same manner.
11921193
If the request is invalid, the Sending Server MUST return an HTTP 400
11931194
response with a JSON object containing an OAuth 2.0 error code
11941195
[RFC6749]:
1196+
11951197
```
11961198
{ "error": "invalid_request" }
11971199
```
1200+
{: type="json"}
11981201

11991202
Permitted error codes are `invalid_request`, `invalid_client`,
12001203
`invalid_grant`, `unauthorized_client` and `unsupported_grant_type`.
@@ -1421,7 +1424,7 @@ public keys at `/.well-known/jwks.json` in the format specified by
14211424
[RFC7517]. Here is an example response from
14221425
`https://sender.example.org/.well-known/jwks.json`:
14231426

1424-
```json
1427+
```
14251428
{
14261429
"keys": [
14271430
{
@@ -1433,12 +1436,13 @@ public keys at `/.well-known/jwks.json` in the format specified by
14331436
]
14341437
}
14351438
```
1439+
{: type="json"}
14361440

14371441
## Signing a Request (Sender)
14381442

14391443
Given a Share Creation Notification request:
14401444

1441-
```
1445+
<sourcecode type="http">
14421446
POST /ocm/shares HTTP/1.1
14431447
Host: receiver.example.org
14441448
Date: Fri, 16 Jan 2026 13:37:00 GMT
@@ -1464,31 +1468,31 @@ Content-Digest: sha-256=:LkpHyFOVbBDPxc7YbHDOWNzAv88qWuVfLNf4TUf9Uo8=:
14641468
}
14651469
}
14661470
}
1467-
```
1471+
</sourcecode>
14681472

14691473
The signature base is constructed according to [RFC9421] (with line
14701474
breaks in @signature-params for display purposes only):
14711475

1472-
```
1476+
<sourcecode type="http">
14731477
"@method": POST
14741478
"@target-uri": https://receiver.example.org/ocm/shares
14751479
"content-digest": sha-256=:<digest-value>=:
14761480
"@signature-params": ("@method" "@target-uri" "content-digest");
1477-
created=<timestamp>;
1481+
created=[timestamp];
14781482
keyid="sender.example.org#key1";
14791483
alg="ed25519"
1480-
```
1484+
</sourcecode>
14811485

14821486
Sign this base using for example Ed25519 ([RFC8032]) to produce the
14831487
signature, then add headers (line breaks for display purposes only):
14841488

1485-
```
1489+
<sourcecode type="http">
14861490
Signature-Input: sig1=("@method" "@target-uri" "content-digest");
1487-
created=<timestamp>;
1491+
created=[timestamp];
14881492
keyid="sender.example.org#key1";
14891493
alg="ed25519"
14901494
Signature: sig1=:<signature-value>=:
1491-
```
1495+
</sourcecode>
14921496

14931497
## Verifying a Signature (Receiver)
14941498

@@ -1540,7 +1544,7 @@ adhere to the following format:
15401544
for the OCM Server
15411545
Example:
15421546

1543-
```json
1547+
```
15441548
{
15451549
"payload": {
15461550
"federation": "The ScienceMesh Directory",
@@ -1563,7 +1567,7 @@ Example:
15631567
"signature": "..."
15641568
}
15651569
```
1566-
1570+
{: type="json"}
15671571

15681572

15691573
# Appendix D: Object models
@@ -1589,7 +1593,7 @@ flow or direct entry. It provides a convenient way for users to
15891593
organize and access their federated contacts, and MAY allow users to
15901594
generate _Invites_.
15911595

1592-
```
1596+
~~~ artwork
15931597
+-----------------+
15941598
| Address Book |
15951599
| |
@@ -1603,7 +1607,8 @@ generate _Invites_.
16031607
+-----------------+ +----------------+
16041608
| Contact | | Invites |
16051609
+-----------------+ +----------------+
1606-
```
1610+
~~~
1611+
16071612
### Properties
16081613

16091614
* __owner__: Reference to the User who owns this address book
@@ -1622,7 +1627,7 @@ created through the Invite process or via direct entry. A Contact MAY
16221627
of course contain much more detailed information about the referenced
16231628
user such as if it was added via _Invites_ or direct entry.
16241629

1625-
```
1630+
~~~ artwork
16261631
+-----------------+
16271632
| Contact |
16281633
+-----------------+
@@ -1638,7 +1643,8 @@ user such as if it was added via _Invites_ or direct entry.
16381643
+-----------------+
16391644
| Address Book |
16401645
+-----------------+
1641-
```
1646+
~~~
1647+
16421648
### Properties
16431649

16441650
* __addedDate__: Timestamp of when contact was added
@@ -1657,7 +1663,7 @@ The Invite entity represents the bidirectional trust establishment
16571663
mechanism in OCM. It facilitates secure contact exchange between users
16581664
on different OCM Servers.
16591665

1660-
```
1666+
~~~ artwork
16611667
+-----------------+
16621668
| Invite |
16631669
+-----------------+
@@ -1673,7 +1679,8 @@ on different OCM Servers.
16731679
| Address Book |
16741680
+-----------------+
16751681

1676-
```
1682+
~~~
1683+
16771684
### Properties
16781685

16791686
* __acceptedTime__: Timestamp of invite acceptance (if accepted)
@@ -1696,7 +1703,7 @@ implementor might find it useful to have a Provider object model to
16961703
store the discovered information about federation peers or other remote
16971704
OCM Providers.
16981705

1699-
```
1706+
~~~ artwork
17001707
+-----------------------+
17011708
| Provider |
17021709
| (OCM Server) |
@@ -1734,7 +1741,7 @@ OCM Providers.
17341741
| - webdav |
17351742
| - ... |
17361743
+------------------+
1737-
```
1744+
~~~
17381745

17391746
### Properties
17401747

@@ -1753,7 +1760,7 @@ The Share entity represents a policy granting access to a _Resource_
17531760
from a Sending Party to a Receiving Party.
17541761

17551762

1756-
```
1763+
~~~ artwork
17571764
+-----------------+ +------------------+
17581765
| Sending Party | | Receiving Party |
17591766
+-----------------+ +------------------+
@@ -1781,7 +1788,7 @@ from a Sending Party to a Receiving Party.
17811788
+-----------------+
17821789
| Resource |
17831790
+-----------------+
1784-
```
1791+
~~~
17851792

17861793
### Properties
17871794

@@ -1815,15 +1822,15 @@ from a Sending Party to a Receiving Party.
18151822
The User entity represents the party in OCM who can send and receive
18161823
Shares and Invites and manage Contacts, and interact with Resources.
18171824

1818-
```
1819-
+-----------------------+
1820-
| User |
1821-
+-----------------------+
1822-
| - email |
1823-
| - name |
1824-
| - ocmAddress |
1825-
| - uid |
1826-
+-----------------------+
1825+
~~~ artwork
1826+
+-----------------------+
1827+
| User |
1828+
+-----------------------+
1829+
| - email |
1830+
| - name |
1831+
| - ocmAddress |
1832+
| - uid |
1833+
+-----------------------+
18271834
|
18281835
+---------+---------+
18291836
| |
@@ -1843,7 +1850,7 @@ Shares and Invites and manage Contacts, and interact with Resources.
18431850
+------------------+
18441851
| - sent[] |
18451852
+------------------+
1846-
```
1853+
~~~
18471854

18481855
### Properties
18491856

@@ -1867,7 +1874,7 @@ Receiving Party through the Sending Server's API. In general a Resource
18671874
is a much more complex entity, but for the purpose of OCM we only need
18681875
to model a few key properties.
18691876

1870-
```
1877+
~~~ artwork
18711878
+-----------------+
18721879
| Resource |
18731880
+-----------------+
@@ -1884,7 +1891,7 @@ to model a few key properties.
18841891
+------------------+
18851892
| Share |
18861893
+------------------+
1887-
```
1894+
~~~
18881895

18891896
### Properties
18901897

0 commit comments

Comments
 (0)