Django Rest Framework Authentication Class for not authorized users
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for drf_is_not_authenticated_class-1.0.0.macosx-10.9-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5625ef97d88c26a9a6be03a32cfcdc291f0f66192ea4eb79918c3f7f46fec73c |
|
MD5 | 06ee0191956d5b160b9fa1d4bc77a256 |
|
BLAKE2b-256 | 1c2e2cc69b09d48c53ddf12b8375ac9551bd6f5dc5a35e7058e4e9a5ac734fd6 |