A djangorestframework-api-key decorator to allow access by key names
Project description
Django RESTframework-api key - Allow by key names
Decorator working with djangorestframework-api-key
allowing to restrict access to a method according to the key
presented.
Usage
Use @allow_only_apikey()
with a list of key names as the first parameter :
class TelegramMemberCheck(APIView):
permission_classes = [HasAPIKey]
@allow_only_apikey(['TelegramBot'])
def get(self, request, format=None):
pass
If the key does not match, an AuthenticationFailed
is returned.
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
Built Distribution
Close
Hashes for djangorestframework-api-key-allowbynames-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9d54ab29d873e0abc4083347788809eecab5df9fc1be9a497226040e66881e2 |
|
MD5 | 35675acaf02be4ea49fed0b978dd2d3b |
|
BLAKE2b-256 | 2f8f45dd3b0ff37a9647dd8ff64ba0e930469c936d736683ba49efd296173ed7 |
Close
Hashes for djangorestframework_api_key_allowbynames-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a43c1d0d096a76eafabe62dad1fbee79b3aeef5bdac235c9606aee118824031 |
|
MD5 | 4f9e4d375866ae09a3190ee60e3647c5 |
|
BLAKE2b-256 | d9fef41cdc38b7be649b87e540a4276dfc9519d5b0293a33cab033c92514a76f |