Metadata-Version: 2.1
Name: django-graphene-authentication
Version: 1.0.83
Summary: A variant of djhango-graphql-jwt that can work with federations
Home-page: https://github.com/Koldar/django-koldar-common-apps
Author: Massimo Bono
Author-email: massimobono1@gmail.com
License: MIT
Keywords: django,graphql,federation
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=>=3.6
Description-Content-Type: text/markdown
License-File: LICENSE.md
License-File: PASSWORD
License-File: PMakeupfile.py
License-File: README.md
License-File: TWINE_PYPI_PASSWORD
License-File: pmakeup-cache.json
License-File: requirements.txt
License-File: setup.py
Requires-Dist: aniso8601 (>=8.1.1)
Requires-Dist: arrow (>=1.1.1)
Requires-Dist: asgiref (>=3.4.1)
Requires-Dist: certifi (>=2021.5.30)
Requires-Dist: chardet (>=4.0.0)
Requires-Dist: charset-normalizer (>=2.0.2)
Requires-Dist: datasize (>=1.0.0)
Requires-Dist: decorator (>=4.4.2)
Requires-Dist: Django (>=3.2.5)
Requires-Dist: django-appconf (>=1.0.4)
Requires-Dist: django-currentuser (>=0.5.3)
Requires-Dist: django-filter (>=2.4.0)
Requires-Dist: django-graphql-jwt (>=0.3.2)
Requires-Dist: django-koldar-utils (>=2.55.16)
Requires-Dist: django-polymorphic (>=3.0.0)
Requires-Dist: djangorestframework (>=3.12.4)
Requires-Dist: docutils (>=0.17.1)
Requires-Dist: graphene (>=3.0b7)
Requires-Dist: graphene-django (>=3.0.0b7)
Requires-Dist: graphene-django-extras (>=0.5.2)
Requires-Dist: graphql-core (>=3.1.5)
Requires-Dist: graphql-relay (>=3.1.0)
Requires-Dist: hurry.filesize (>=0.9)
Requires-Dist: idna (>=3.2)
Requires-Dist: inflect (>=5.3.0)
Requires-Dist: inflection (>=0.5.1)
Requires-Dist: jmespath (>=0.10.0)
Requires-Dist: m2r (>=0.2.1)
Requires-Dist: mistune (>=0.8.4)
Requires-Dist: networkx (>=2.5.1)
Requires-Dist: Pillow (>=8.3.1)
Requires-Dist: promise (>=2.3)
Requires-Dist: pydot (>=1.4.2)
Requires-Dist: PyJWT (>=2.1.0)
Requires-Dist: pyparsing (>=2.4.7)
Requires-Dist: python-dateutil (>=2.8.2)
Requires-Dist: pytz (>=2021.1)
Requires-Dist: requests (>=2.26.0)
Requires-Dist: Rx (>=3.2.0)
Requires-Dist: singledispatch (>=3.6.2)
Requires-Dist: six (>=1.16.0)
Requires-Dist: sqlparse (>=0.4.2)
Requires-Dist: stringcase (>=1.2.0)
Requires-Dist: text-unidecode (>=1.3)
Requires-Dist: urllib3 (>=1.26.6)
Provides-Extra: docs
Requires-Dist: sphinx ; extra == 'docs'
Requires-Dist: sphinx-rtd-theme ; extra == 'docs'
Provides-Extra: test
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: mock ; extra == 'test'


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
============

.. code-block::

   pip install django-graphql-apitoken

Configuration
=============

You need to add this app to the INSTALLED_APPS:

.. code-block::

   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:


