docs: Various formatting improvements
This commit is contained in:
committed by
Wolfgang Walther
parent
4a796e0758
commit
0e7af7b77b
@@ -163,6 +163,7 @@ If you want to have a visual overview of your API in your browser you can add sw
|
|||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
# in services:
|
||||||
swagger:
|
swagger:
|
||||||
image: swaggerapi/swagger-ui
|
image: swaggerapi/swagger-ui
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ If Docker is not installed, you can get it `here <https://www.docker.com/get-sta
|
|||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sudo docker run --name tutorial -p 5433:5432 \
|
sudo docker run --name tutorial -p 5433:5432 \
|
||||||
-e POSTGRES_PASSWORD=mysecretpassword \
|
-e POSTGRES_PASSWORD=notused \
|
||||||
-d postgres
|
-d postgres
|
||||||
|
|
||||||
This will run the Docker instance as a daemon and expose port 5433 to the host system so that it looks like an ordinary PostgreSQL server to the rest of the system.
|
This will run the Docker instance as a daemon and expose port 5433 to the host system so that it looks like an ordinary PostgreSQL server to the rest of the system.
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ It's better policy to include an expiration timestamp for tokens using the :code
|
|||||||
|
|
||||||
Epoch time is defined as the number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), January 1st 1970, minus the number of leap seconds that have taken place since then.
|
Epoch time is defined as the number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), January 1st 1970, minus the number of leap seconds that have taken place since then.
|
||||||
|
|
||||||
To observe expiration in action, we'll add an :code:`exp` claim of five minutes in the future to our previous token. First find the epoch value of five minutes from now. In psql run this:
|
To observe expiration in action, we'll add an :code:`exp` claim of five minutes in the future to our previous token. First find the epoch value of five minutes from now. In :code:`psql` run this:
|
||||||
|
|
||||||
.. code-block:: postgres
|
.. code-block:: postgres
|
||||||
|
|
||||||
@@ -155,7 +155,7 @@ Go back to jwt.io and change the payload to
|
|||||||
"exp": 123456789
|
"exp": 123456789
|
||||||
}
|
}
|
||||||
|
|
||||||
**NOTE**: Don't forget to change the dummy epoch value :code:`123456789` in the snippet above to the epoch value returned by the psql command.
|
**NOTE**: Don't forget to change the dummy epoch value :code:`123456789` in the snippet above to the epoch value returned by the :code:`psql` command.
|
||||||
|
|
||||||
Copy the updated token as before, and save it as a new environment variable.
|
Copy the updated token as before, and save it as a new environment variable.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user