Skip to main content

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_class

Use cases

  1. Only not registered users should be able to create new user
from drf_is_not_authenticated_class import IsNotAuthenticated


class RegisterUser(CreateAPIView):
    queryset = User.objects.all()
    permission_classes = (IsNotAuthenticated,)

Contribution

Metadata

Release files for drf-is-not-authenticated-class 1.0.0

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

Source distribution (sdist)

Source distribution for drf-is-not-authenticated-class 1.0.0
File Size Uploaded Provenance Actions
drf_is_not_authenticated_class-1.0.0.win32.zip 9.2 kB Without provenance Details for drf_is_not_authenticated_class-1.0.0.win32.zip

Release files / drf_is_not_authenticated_class-1.0.0.win32.zip

Download URL drf_is_not_authenticated_class-1.0.0.win32.zip
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6384191d297a9f29d2dc64d588de870a26f8588f0186c677b5369f617bc5cca0
BLAKE2b-256 checksum
How to use checksums
780886bee5752d6c5bca635f85e479620ee02af05dc63181c15e80917491a5aa
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-class 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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file No provenance

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