Introduction
Customizable backend that uses graphql to authenticate users. Abstraction of a graphql authentication mechanism. This is an modification of django-graphql-jwt: I drop some functionalities that I did not care and add capabilities that I needed.
Capabilities dropped:
cookies;
Capabilities added:
custom names and exceptions for authentication graphql mutrations/queries (needed for federations);
ability to customize authentication mechanism;
ability to work with graphene-federations when there are multiple authentication mechanisms;
ability to be easily extended;
Motivation
I needed to work with graphene federations wehere there werre multiple graphqlk mutations with names like “login”, “me”, “refresdh_tokens” and so on. django-graphql-jwt was more an hindrance than anything else since I need to authenticate via a token rather tha username and password. In the end I ported the feature I needed from django-graphql-jwt and created this variant.
This apps does not rely on its oiwn authentication mechanism, but just relay all the information it knows about the graphql request to the auithentication backend. In this way you are in charge to perform authentication.
Still, the package provides some standard authentication mechanism you can use.
Installation
pip install django-graphql-apitoken
Configuration
You need to add this app to the INSTALLED_APPS:
INSTALLED_APPS += "django_graphql_apitoken"
The second step is to create the authentication classes that graphene needs to be aware of. Create a new file in your project root and add the following:
Metadata
Release files for django-graphene-authentication 1.0.87
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_graphene_authentication-1.0.87-py3-none-any.whl | Python 3 | none | any | Details for django_graphene_authentication-1.0.87-py3-none-any.whl |
Release files / django_graphene_authentication-1.0.87-py3-none-any.whl
| Download URL | django_graphene_authentication-1.0.87-py3-none-any.whl |
|---|---|
| Size | 30.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a90b13550fafcc4357fec0aeed66c9034aefa247075988c1406421ceb4751f75
|
|
BLAKE2b-256 checksum How to use checksums |
b8dd44f8e3ce90ea7e764cad51ade15b37d4acc6b6ef2393b1058fcb6b2152e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.8
|
Security for django-graphene-authentication 1.0.87
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.