Skip to content

Commit

Permalink
let there be colour
Browse files Browse the repository at this point in the history
  • Loading branch information
bashu committed Jan 21, 2019
1 parent c570396 commit f23d6e0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ Configuration
-------------

To enable permanent token authentication, update rest framework's default authentication classes list:
::

.. code-block:: python
REST_FRAMEWORK={
"DEFAULT_AUTHENTICATION_CLASSES": [
Expand All @@ -26,7 +27,8 @@ To enable permanent token authentication, update rest framework's default authen
}
Another step is to add a few urls to your url patterns, and register the ``DeviceViewSet``:
::

.. code-block:: python
from jwt_devices import views
from rest_framework.routers import DefaultRouter
Expand All @@ -49,7 +51,8 @@ Using the API views
When using the regular JWT login or the device logout view, use the ``X-Device-Model`` header to pass device model
(otherwise, user agent will used instead as the name). After a successful login, the permanent token and id of the
created device will be returned, for example:
::

.. code-block:: javascript
{
"token": "ads344fdgfd5454yJ0eAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VynRlYW1AYXJhYmVsLmxh",
Expand Down

0 comments on commit f23d6e0

Please sign in to comment.