Metadata-Version: 2.0
Name: drf-secure-token
Version: 1.0.4
Summary: Add secure token to djnago-rest-framework
Home-page: UNKNOWN
Author: Tima Akulich
Author-email: tima.akulich@gmail.com
License: BSD License
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Requires-Dist: djangorestframework

================
DRF Secure Token
================

Quick start
-----------

1. Add "drf_secure_token" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [
        ...
        'rest_framework',
        'drf_secure_token',
    ]

2. Add following lines to your settings.py::

    REST_FRAMEWORK = {
        'DEFAULT_AUTHENTICATION_CLASSES': [
            'rest_framework.authentication.BasicAuthentication',
            'drf_secure_token.authentication.SecureTokenAuthentication',
         ]
    }

3. For updating token add this middleware to your MIDDLEWARE_CLASSES::

    MIDDLEWARE_CLASSES = (
        ...
        'drf_secure_token.middleware.UpdateTokenMiddleware',
    )

4. Add UPDATE_TOKEN to your 'dev' settings if you don't want to update token in DEBUG mode::

    UPDATE_TOKEN = False

5. Add TOKEN_AGE to your settings::

    TOKEN_AGE = 60*10 # 10 min

6. Run `python manage.py migrate` to create the drf_secure_token models.


