Metadata-Version: 2.1
Name: django-expiring-token
Version: 1.0
Summary: Expiring token with expiration time update for Django Rest Framework
Home-page: https://github.com/KlemenS189/django-expiring-token
Author: Klemen Štrajhar
Author-email: klemen.strajhar@gmail.si
License: MIT License
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Framework :: Django :: 2.0
Classifier: Framework :: Django :: 2.1
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Dist: djangorestframework (>=3.4.0)

=====================
Django Expiring Token
=====================

Django Expiring Token adds token expiration on token authentication and extends the
expiration time on each authenticated request.

Django Expiring Token provides a very lightweight extension to DRF's existing token authentication.
It implements the following functionalities:

1. Tokens expire after the set time.
2. On each authenticated request, the expiration time is updated by the set time.

Quick start
-----------
1. Do NOT add "restframework.authtoken" to you INSTALLED_APPS.

2. Add "django_expiring_token" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [
        ...
        'django_expiring_token',
    ]

3. Include the polls URLconf in your project urls.py like this::

    path('custom-url/', include('django_expiring_token.urls')),

4. Add the expiration time in `settings.py`::

    EXPIRING_TOKEN_DURATION=timedelta(hours=1)
    # Any timedelta setting can be used!

4. Run `python manage.py migrate` to create the ExpiringToken model.

5. Start the development server.


