Skip to content

Commit

Permalink
should have commited more often oops
Browse files Browse the repository at this point in the history
  • Loading branch information
bitfl0wer committed Dec 24, 2023
1 parent 747a1ae commit f39cee4
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 55 deletions.
12 changes: 12 additions & 0 deletions docs/APIs/Server-Client API/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Server-Client API

The following pages document the server-client API of polyproto. Each file represents a group of
routes, organizing them by their purpose.

---

--8<-- "snippets/api.md"

---

--8<-- "snippets/glossary.md"
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@

Routes concerning the creation, deletion and management of federation tokens.

### <p class="request-h"><span class="request request-get">GET</span> Generate Federation Token</p>
---

### <p class="request-h"><span class="request request-get">GET</span> Generate Federation Token [:material-pail-outline:](../../rate-limits.md "Bucket: federation-token-generation") [:material-lock-outline:](#authorization "Authorization required") </p>

`http://localhost:3001/api/federation/token`

Ask your home server to generate a federation token for you. You can use this token to authenticate on another server.
Ask your home server to generate a federation token for you. You can use this token to identify yourself on another server.

The token is signed using the home server's public signing key, so that other servers can verify its authenticity.
Federation tokens are signed using the home server's public signing key, so that other servers can verify its authenticity.

#### Body

```json
{
"server": "https://server.example.com"
}

```

#### Response
Expand All @@ -41,7 +43,9 @@ The token is signed using the home server's public signing key, so that other se
}
```

### <p class="request-h"><span class="request request-get">GET</span> Get token generation status</p>
---

### <p class="request-h"><span class="request request-get">GET</span> Get token generation status [:material-pail-outline:](../../rate-limits.md "Bucket: ip") [:material-lock-open-outline:](#authorization "Authorization not required")</p>

`http://localhost:3001/api/federation/generation`

Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions docs/APIs/errors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Errors
Empty file added docs/APIs/index.md
Empty file.
1 change: 1 addition & 0 deletions docs/APIs/rate-limits.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Rate limits
20 changes: 0 additions & 20 deletions docs/Server-Client API/index.md

This file was deleted.

22 changes: 20 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Start
---
title: Home
---

## polyproto

# polyproto

Advanced, secure and scalable protocol for federated chat services.

The core of the protocol lies in the [protocol specification](./specification.md) and in the federation
API routes, which are used to negotiate and establish connections between foreign servers and
clients.

Theoretically, the polyproto-core federation protocol can be used with a different set of chat-APIs
However, a full implementation of the protocol requires the use of the
polyproto-chat routes.

!!! info
polyproto provides no chat-interoperability if you do not use the polyproto-chat API.

---

--8<-- "snippets/glossary.md"
11 changes: 8 additions & 3 deletions docs/specification.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--Do not remove the #-->
#
--8<-- "SPECIFICATION.md"
---
title: Protocol Specification
---


--8<-- "SPECIFICATION.md"

--8<-- "snippets/glossary.md"
7 changes: 5 additions & 2 deletions snippets/glossary.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Glossary

- **polyproto-core** - The core federation protocol and APIs of polyproto. It is used to establish connections between servers and clients. It is independent of the chat-API used.
- **polyproto-core** - The core federation protocol and APIs of polyproto, enabling identification and authorization on 'foreign' servers. It is independent of the chat-API used.
- **polyproto-chat** - The chat-API used by polyproto. It defines the routes and capabilities of the chat-API used by polyproto.
- **polyproto** - The combination of the polyproto-core and polyproto-chat protocols and APIs.
- **polyproto** - The combination of the polyproto-core and polyproto-chat protocols and APIs.
- **Home server** - The server that a user is registered on.
- **User** - An individual person that is registered on a server.
- **Client** - A device that is used by a user to connect to a server.
23 changes: 0 additions & 23 deletions snippets/responses/429.md

This file was deleted.

0 comments on commit f39cee4

Please sign in to comment.