Django Rest Framework Authentication Class for not authorized users
Some DRF views should not be accessible by logged in users. In such cases we need permission class that will not allow authorized users to access the resource or action.
Installation
pip install drf_is_not_authenticated
Use cases
- Only not registered users should be able to create new user
from drf_is_not_authenticated import IsNotAuthenticated
class RegisterUser(CreateAPIView):
queryset=User.objects.all()
permission_classes = (IsNotAuthenticated,)
Contribution
Metadata
Release files for drf-is-not-authenticated 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| drf_is_not_authenticated_class-1.0.0.macosx-10.9-x86_64.tar.gz | 2.3 kB | Without provenance | Details for drf_is_not_authenticated_class-1.0.0.macosx-10.9-x86_64.tar.gz |
Release files / drf_is_not_authenticated_class-1.0.0.macosx-10.9-x86_64.tar.gz
| Download URL | drf_is_not_authenticated_class-1.0.0.macosx-10.9-x86_64.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5625ef97d88c26a9a6be03a32cfcdc291f0f66192ea4eb79918c3f7f46fec73c
|
|
BLAKE2b-256 checksum How to use checksums |
1c2e2cc69b09d48c53ddf12b8375ac9551bd6f5dc5a35e7058e4e9a5ac734fd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.5
|
Security for drf-is-not-authenticated 1.0.0
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.