1
0
Derivar 0
Este cometimento está contido em:
AJ ONeal 2018-08-02 11:33:47 -06:00
ascendente dd9fff02a1
cometimento 9c17248bfa
1 ficheiros modificados com 6 adições e 7 eliminações

Ver ficheiro

@ -10,7 +10,7 @@
<li>
<h3>POST /api/sessions
<br>
<code>{"sub":"<strong><em>jon@example.com</em></strong>"}</code>
<code>{"sub":"<strong><em>&lt;email&gt;</em></strong>"}</code>
</h3>
<pre><code># Ask for an auth code (swap sub)
@ -21,9 +21,9 @@ curl -X POST http://localhost:4080/api/sessions \
</li>
<li>
<h3>POST /api/sessions/<strong><em>id</em></strong>
<h3>POST /api/sessions/<strong><em>&lt;id&gt;</em></strong>
<br>
<code>{"otp":"<strong><em>auth-code</em></strong>"}</code>
<code>{"otp":"<strong><em>&lt;auth-code&gt;</em></strong>"}</code>
</h3>
<pre><code># Validate auth code (swap session id, sub, and otp)
@ -39,8 +39,8 @@ curl -X POST http://localhost:4080/api/sessions/<strong><em>xyz</em></strong> \
<li>
<h3>POST /api/rooms/general
<br>
<code>Authorization: Bearer <strong><em>api-token</em></strong>
<br>{"message":"<strong><em>Hello, World!</em></strong>"}</code>
<code>Authorization: Bearer <strong><em>&lt;api-token&gt;</em></strong>
<br>{"message":"<strong><em>&lt;msg&gt;</em></strong>"}</code>
</h3>
<pre><code># Post a message (swap api-token)
@ -54,8 +54,7 @@ curl -X POST http://localhost:4080/api/rooms/general \
<li>
<h3>GET /api/rooms/general
<br>
<code>Authorization: Bearer <strong><em>api-token</em></strong>
<br>{"message":"<strong><em>Hello, World!</em></strong>"}</code>
<code>Authorization: Bearer <strong><em>&lt;api-token&gt;</em></strong></code>
</h3>
<pre><code># Get a room's messages (swap api-token, since unix-epoch)