Skip to main content

Django Auth Protection

Django Auth Protection This package logout users from the system by changing the password in REST API.


Why Django Auth Protection?

Simple JWT provides a JSON Web Token authentication backend for the Django REST Framework. It aims to cover the most common use cases of JWTs by offering a conservative set of default features. It also aims to be easily extensible in case a desired feature is not present. But one of the problems is that when the users change the password, they can continue to work on the system with the previous token until it expires. This package overrides the Simple JWT to solve this problem.


How to use it


  • Download and install latest version of Django Auth Protection:
$ pip install django-auth-protection
# or
$ easy_install django-auth-protection

Then you have to create a custom TokenObtainPairView class and change the serializer_class to ProtectTokenObtainPairSerializer (follow the sample):

  • Make a custom TokenObtainPairView and change the serializer_class:
from auth_protection.serializers import ProtectTokenObtainPairSerializer


class CustomTokenObtainPairView(TokenObtainPairView):

    serializer_class = ProtectTokenObtainPairSerializer
  • Change All authentication_classes on your views and replace it with JWTAuthProtection:
from auth_protection.authentications import JWTAuthProtection


class SampleView(TARGET_VIEW):
    authentication_classes = [JWTAuthProtection]

Metadata

Release files for django-auth-protection 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-auth-protection 1.0.3
File Size Uploaded Provenance Actions
django-auth-protection-1.0.3.tar.gz 4.9 kB Without provenance Details for django-auth-protection-1.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-auth-protection 1.0.3
File Interpreter ABI Platform Actions
django_auth_protection-1.0.3-py3-none-any.whl Python 3 none any Details for django_auth_protection-1.0.3-py3-none-any.whl

Total release size: 10.8 kB

Release files / django-auth-protection-1.0.3.tar.gz

Download URL django-auth-protection-1.0.3.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
043b489303ef495f9d84e1fc000517b92e00118449d6a79c11e0fd8c8410d201
BLAKE2b-256 checksum
How to use checksums
a19688b3c75fc0fd2887ef7ad4033af5c6ff9fb62cf04c6b5a7be9fae4e7aa5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.7.1 requests/2.22.0 setuptools/58.2.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Release files / django_auth_protection-1.0.3-py3-none-any.whl

Download URL django_auth_protection-1.0.3-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e732c5b9fb0674fdd2b13ee363cf2cddd2e680f5895a36d9494c560b20cb6c4
BLAKE2b-256 checksum
How to use checksums
0e125956203be6e5954e2e8974609384a8415622b9b810be777389968a94a73a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.7.1 requests/2.22.0 setuptools/58.2.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Security for django-auth-protection 1.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page