{ "info": { "author": "Michael van Tellingen", "author_email": "m.vantellingen@labdigital.nl", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.11", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6" ], "description": "==================\ndjango-cognito-jwt\n==================\n\nAn Authentication backend for Django Rest Framework for AWS Cognito JWT tokens\n\nStatus\n======\n.. image:: https://travis-ci.org/labd/django-cognito-jwt.svg?branch=master\n :target: https://travis-ci.org/labd/django-cognito-jwt\n\n.. image:: http://codecov.io/github/LabD/django-cognito-jwt/coverage.svg?branch=master\n :target: http://codecov.io/github/LabD/django-cognito-jwt?branch=master\n\n.. image:: https://img.shields.io/pypi/v/django-cognito-jwt.svg\n :target: https://pypi.python.org/pypi/django-cognito-jwt/\n\n.. image:: https://readthedocs.org/projects/django-cognito-jwt/badge/?version=latest\n :target: https://django-cognito-jwt.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\nInstallation\n============\n\n.. code-block:: shell\n\n pip install django-cognito-jwt\n\nUsage\n=====\n\nAdd the following lines to your Django ``settings.py`` file:\n\n.. code-block:: python\n\n COGNITO_AWS_REGION = '' # 'eu-central-1'\n COGNITO_USER_POOL = '' # 'eu-central-1_xYzaq'\n COGNITO_AUDIENCE = ''\n\n(Optional) If you want to cache the Cognito public keys between requests you can\nenable the ``COGNITO_PUBLIC_KEYS_CACHING_ENABLED`` setting (it only works if you\nhave the Django ``CACHES`` setup to anything other than the dummy backend).\n\n.. code-block:: python\n\n COGNITO_PUBLIC_KEYS_CACHING_ENABLED = True\n COGNITO_PUBLIC_KEYS_CACHING_TIMEOUT = 60*60*24 # 24h caching, default is 300s\n\nAlso update the rest framework settings to use the correct authentication backend:\n\n.. code-block:: python\n\n REST_FRAMEWORK = {\n 'DEFAULT_AUTHENTICATION_CLASSES': [\n ...\n 'django_cognito_jwt.JSONWebTokenAuthentication',\n ...\n ],\n ...\n }\n\n\n\nBe sure you are passing the ID Token JWT from Cognito as the authentication header.\nUsing the Access Token will work for authentication only but we're unable to use the `get_or_create_for_cognito` method with the Access Token.\n\n\n(Optional) If you want to use a different user model then the default DJANGO_USER_MODEL\nyou can use the ``COGNITO_USER_MODEL`` setting.\n\n.. code-block:: python\n\n\tCOGNITO_USER_MODEL = \"myproject.AppUser\"\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/LabD/django-cognito-jwt", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-cognito-jwt", "package_url": "https://pypi.org/project/django-cognito-jwt/", "platform": "", "project_url": "https://pypi.org/project/django-cognito-jwt/", "project_urls": { "Homepage": "https://github.com/LabD/django-cognito-jwt" }, "release_url": "https://pypi.org/project/django-cognito-jwt/0.0.3/", "requires_dist": [ "Django (>=1.11)", "cryptography", "djangorestframework", "pyjwt", "requests", "sphinx (>=1.4.0) ; extra == 'docs'", "coverage (==.4.4.2) ; extra == 'test'", "pytest (==3.3.2) ; extra == 'test'", "pytest-cov (==2.5.1) ; extra == 'test'", "pytest-django (==3.1.2) ; extra == 'test'", "pytest-responses (==0.3.0) ; extra == 'test'", "isort (==4.2.15) ; extra == 'test'", "flake8 (==3.5.0) ; extra == 'test'", "flake8-blind-except (==0.1.1) ; extra == 'test'", "flake8-imports (==0.1.1) ; extra == 'test'", "flake8-debugger (==3.0.0) ; extra == 'test'" ], "requires_python": "", "summary": "Django backends for AWS Cognito JWT", "version": "0.0.3" }, "last_serial": 5890566, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "d026687959cf60ca71ab4acebb7d8072", "sha256": "ddb4d8cffa18f4f0574739bf2adabbae08c5cd403cee50e2ae2bee932ac0f09b" }, "downloads": -1, "filename": "django_cognito_jwt-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d026687959cf60ca71ab4acebb7d8072", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4946, "upload_time": "2018-01-19T10:54:24", "url": "https://files.pythonhosted.org/packages/a3/53/3febdfebb17bceae092d8e837de78d91b99950f4358a7bb919970eb12066/django_cognito_jwt-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "752b8b7e884daaf452f576766e8cf360", "sha256": "5fa0edc42e16280cfb3c0af2bca7a6196050111cb55fda46faf272090a8cc61c" }, "downloads": -1, "filename": "django-cognito-jwt-0.0.1.tar.gz", "has_sig": false, "md5_digest": "752b8b7e884daaf452f576766e8cf360", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3247, "upload_time": "2018-01-19T10:54:26", "url": "https://files.pythonhosted.org/packages/3f/0a/69fdba616baffd2f7edafef5dc5da3a11b8f9a227bf33bf6692548cc9179/django-cognito-jwt-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "731a21ed0c055697166b0f0d433e77a4", "sha256": "baa6094ce1f2494fb703323bddec6ea3174ac301473a6509e41065f8d2ecd0b7" }, "downloads": -1, "filename": "django_cognito_jwt-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "731a21ed0c055697166b0f0d433e77a4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5460, "upload_time": "2019-03-05T09:22:37", "url": "https://files.pythonhosted.org/packages/39/ed/74b6147786a3eabeb4cf6adcc4caf6be42628c356920cece1c22267a13cb/django_cognito_jwt-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ff75bb9365783c77aece26c222b9133f", "sha256": "c90df2fdcef18376275b309b39766f65e18286d24f94836accab808762d0bca4" }, "downloads": -1, "filename": "django-cognito-jwt-0.0.2.tar.gz", "has_sig": false, "md5_digest": "ff75bb9365783c77aece26c222b9133f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4181, "upload_time": "2019-03-05T09:22:39", "url": "https://files.pythonhosted.org/packages/75/31/63b06559a7b9579eb8546821db31cc22d4dd959ff3b52e662b45b3bd14eb/django-cognito-jwt-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "2e8edd568f52d620ea36ed3c31bc396b", "sha256": "1ebc75725042bf1c6b09defef01b413c136a0897c8f3ad5433b550fa691fa8a3" }, "downloads": -1, "filename": "django_cognito_jwt-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2e8edd568f52d620ea36ed3c31bc396b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5589, "upload_time": "2019-04-15T13:27:50", "url": "https://files.pythonhosted.org/packages/46/e9/5870eb6ce71b40b28487f033ac05c93a8305ed8b3594136f42dcd6354149/django_cognito_jwt-0.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f0a31e4569c3292ed45cde368e7e9092", "sha256": "6e9dfb79b262c338a493b71f81811621f88fb0af88d4b86e896252a9c00c81bf" }, "downloads": -1, "filename": "django-cognito-jwt-0.0.3.tar.gz", "has_sig": false, "md5_digest": "f0a31e4569c3292ed45cde368e7e9092", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4329, "upload_time": "2019-04-15T13:27:52", "url": "https://files.pythonhosted.org/packages/93/27/f086263b9ae5fae3ab7db14023b0d82c94ce5976735607c2324cfb374855/django-cognito-jwt-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2e8edd568f52d620ea36ed3c31bc396b", "sha256": "1ebc75725042bf1c6b09defef01b413c136a0897c8f3ad5433b550fa691fa8a3" }, "downloads": -1, "filename": "django_cognito_jwt-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2e8edd568f52d620ea36ed3c31bc396b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5589, "upload_time": "2019-04-15T13:27:50", "url": "https://files.pythonhosted.org/packages/46/e9/5870eb6ce71b40b28487f033ac05c93a8305ed8b3594136f42dcd6354149/django_cognito_jwt-0.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f0a31e4569c3292ed45cde368e7e9092", "sha256": "6e9dfb79b262c338a493b71f81811621f88fb0af88d4b86e896252a9c00c81bf" }, "downloads": -1, "filename": "django-cognito-jwt-0.0.3.tar.gz", "has_sig": false, "md5_digest": "f0a31e4569c3292ed45cde368e7e9092", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4329, "upload_time": "2019-04-15T13:27:52", "url": "https://files.pythonhosted.org/packages/93/27/f086263b9ae5fae3ab7db14023b0d82c94ce5976735607c2324cfb374855/django-cognito-jwt-0.0.3.tar.gz" } ] }