File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 1515.. image :: https://img.shields.io/pypi/v/django-cognito-jwt.svg
1616 :target: https://pypi.python.org/pypi/django-cognito-jwt/
1717
18+ .. image :: https://readthedocs.org/projects/django-cognito-jwt/badge/?version=latest
19+ :target: https://django-cognito-jwt.readthedocs.io/en/latest/?badge=latest
20+ :alt: Documentation Status
1821
1922Installation
2023============
Original file line number Diff line number Diff line change @@ -9,3 +9,28 @@ Installation
99.. code-block :: shell
1010
1111 pip install django_cognito_jwt
12+
13+
14+ Usage
15+ =====
16+
17+ Add the following lines to your Django settings.py file:
18+
19+ .. code-block :: python
20+
21+ COGNITO_AWS_REGION = ' <aws region>' # 'eu-central-1'
22+ COGNITO_USER_POOL = ' <user pool>' # 'eu-central-1_xYzaq'
23+ COGNITO_AUDIENCE = ' <client id>'
24+
25+ Also update the rest framework settings to use the correct authentication backend:
26+
27+ .. code-block :: python
28+
29+ REST_FRAMEWORK = {
30+ ' DEFAULT_AUTHENTICATION_CLASSES' : [
31+ ...
32+ ' django_cognito_jwt.JSONWebTokenAuthentication' ,
33+ ...
34+ ],
35+ ...
36+ }
You can’t perform that action at this time.
0 commit comments