aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2017-08-05 14:46:05 +0200
committerVirtualTam <virtualtam@flibidi.net>2017-08-05 14:46:05 +0200
commitf320efd689f17737ccbdef46cdc430d9e637b807 (patch)
tree4bc544ae7561ac6e9b9cb6a02d869df1361df1bf /doc
parent23daed648c94022098794e17fee54b3627b29275 (diff)
downloadShaarli-f320efd689f17737ccbdef46cdc430d9e637b807.tar.gz
Shaarli-f320efd689f17737ccbdef46cdc430d9e637b807.tar.zst
Shaarli-f320efd689f17737ccbdef46cdc430d9e637b807.zip
documentation: elaborate on REST API server & client prerequisites
Relates to https://github.com/shaarli/Shaarli/issues/903 Relates to https://github.com/shaarli/Shaarli/issues/905 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'doc')
-rw-r--r--doc/md/REST-API.md22
-rw-r--r--doc/md/Server-requirements.md1
2 files changed, 19 insertions, 4 deletions
diff --git a/doc/md/REST-API.md b/doc/md/REST-API.md
index f3f0b17a..0b8aba8a 100644
--- a/doc/md/REST-API.md
+++ b/doc/md/REST-API.md
@@ -1,6 +1,18 @@
1## Usage 1## Usage and Prerequisites
2 2
3See the [REST API documentation](http://shaarli.github.io/api-documentation/). 3See the [REST API documentation](http://shaarli.github.io/api-documentation/)
4for a list of available endpoints and parameters.
5
6Please ensure that your server meets the [requirements](Server-requirements)
7and is properly [configured](Server-configuration):
8
9- URL rewriting is enabled (see specific Apache and Nginx sections)
10- the server's timezone is properly defined
11- the server's clock is synchronized with
12 [NTP](https://en.wikipedia.org/wiki/Network_Time_Protocol)
13
14The host where the API client is invoked should also be synchronized with NTP,
15see [token expiration](#payload).
4 16
5## Authentication 17## Authentication
6 18
@@ -43,9 +55,11 @@ ewogICAgICAgICJ0eXAiOiAiSldUIiwKICAgICAgICAiYWxnIjogIkhTNTEyIgogICAgfQ==
43 55
44#### Payload 56#### Payload
45 57
46**Validity duration** 58**Token expiration**
47 59
48To avoid infinite token validity, JWT tokens must include their creation date in UNIX timestamp format (timezone independant - UTC) under the key `iat` (issued at). This token will be accepted during 9 minutes. 60To avoid infinite token validity, JWT tokens must include their creation date
61in UNIX timestamp format (timezone independent - UTC) under the key `iat` (issued at).
62This token will be valid during **9 minutes**.
49 63
50```json 64```json
51{ 65{
diff --git a/doc/md/Server-requirements.md b/doc/md/Server-requirements.md
index bec08e49..707af762 100644
--- a/doc/md/Server-requirements.md
+++ b/doc/md/Server-requirements.md
@@ -18,6 +18,7 @@ Version | Status | Shaarli compatibility
185.3 | EOL: 2014-08-14 | Yes (up to Shaarli 0.8.x) 185.3 | EOL: 2014-08-14 | Yes (up to Shaarli 0.8.x)
19 19
20See also: 20See also:
21
21- [Travis configuration](https://github.com/shaarli/Shaarli/blob/master/.travis.yml) 22- [Travis configuration](https://github.com/shaarli/Shaarli/blob/master/.travis.yml)
22 23
23### Dependency management 24### Dependency management