Metadata-Version: 2.1
Name: django_rest_token_expiry
Version: 0.0.3
Summary: Django REST Token Expiry is a Python package designed to add token expiration functionality to Django REST Framework's default token authentication system. This package allows developers to set expiry durations for authentication tokens, enhancing security by automatically invalidating tokens after a specified period.
Home-page: https://github.com/joe-philip/django_rest_token_expiry.git
Author: Joe Philip
Author-email: joe.philip@hotmail.co.in
License: MIT License
Description: # Django REST Token Expiry
        
        Django REST Token Expiry is a Python package designed to add token expiration functionality to Django REST Framework's default token authentication system. This package allows developers to set expiry durations for authentication tokens, enhancing security by automatically invalidating tokens after a specified period.
        Installation
        
        You can install Django REST Token Expiry via pip:
        
        ```bash
        pip install django-rest-token-expiry
        ```
        
        ## Usage
        Define `AUTHENTICATION_TOKEN_EXPIRY` in your `settings.py` with the desired time delta value for token expiration:
        
        ```python
        from datetime import timedelta
        
        AUTHENTICATION_TOKEN_EXPIRY = timedelta(days=7)  # Example: Token expires in 7 days
        ```
        
        Update the `DEFAULT_AUTHENTICATION_CLASSES` setting in your `REST_FRAMEWORK` settings to include `ExpiringTokenAuthentication`:
        
        ```python
        REST_FRAMEWORK = {
            'DEFAULT_AUTHENTICATION_CLASSES': [
                'django_rest_token_expiry.authentication.ExpiringTokenAuthentication' # ... other authentication classes
            ]
        }
        ```
        
        Now, the authentication tokens generated by Django REST Framework will have expiration based on the duration specified in `AUTHENTICATION_TOKEN_EXPIRY`.
        Contributing
        
        Contributions are welcome! If you'd like to contribute to this project, please fork the repository and submit a pull request with your changes.
        License
        
        This project is licensed under the MIT License - see the LICENSE file for details.
Platform: UNKNOWN
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: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Description-Content-Type: text/markdown
